Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] convert attribute type error
[ATL] convert attribute type error [message #535524] Mon, 24 May 2010 09:21 Go to next message
Sébastien  Gandon is currently offline Sébastien GandonFriend
Messages: 184
Registered: July 2009
Senior Member
Hello,
I have to transform an Attribute of type Integer to and attribute on type Long.
If I simply do
precision <- s.precision
where s.precesion is of type Integer and precision is or f type Long.
I have the following error message:
org.eclipse.m2m.atl.engine.vm.VMException: Cannot set feature OUTMODEL!MetadataColumn.precision to value 10
at A.__applyMetadataColumn(1 : NTransientLink;) : ??#96(TosMetadata400to410.atl[66:9-66:33])
local variables = {t=OUT!<notnamedyet>, s=IN!<unnamed>, link=TransientLink {rule = 'MetadataColumn', sourceElements = {s = IN!<unnamed>}, targetElements = {t = OUT!<notnamedyet>, newInitialValue = OUT!<unnamed>}, variables = {}}, self=TosMetadata400to410 : ASMModule, newInitialValue=OUT!<unnamed>}
local stack = [OUT!<notnamedyet>]
Java Stack:
org.eclipse.m2m.atl.engine.vm.VMException: Cannot set feature OUTMODEL!MetadataColumn.precision to value 10
at org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement.set(A SMEMFModelElement.java:513)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:323)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:173)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:130)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:78)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:251)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:357)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:173)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:130)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:78)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:251)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:173)
at org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:346)
at org.eclipse.m2m.atl.core.ui.vm.RegularVMLauncher.internalLau nch(RegularVMLauncher.java:253)
at org.eclipse.m2m.atl.core.ui.vm.RegularVMLauncher.launch(Regu larVMLauncher.java:164)
at org.eclipse.m2m.atl.core.service.LauncherService.launch(Laun cherService.java:136)
at org.eclipse.m2m.atl.core.ui.launch.AtlLaunchConfigurationDel egate.launchOrDebug(AtlLaunchConfigurationDelegate.java:300)
at org.eclipse.m2m.atl.core.ui.launch.AtlLaunchConfigurationDel egate.launch(AtlLaunchConfigurationDelegate.java:237)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:853)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:702)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:923)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlu gin.java:1126)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.ClassCastException: The value of type 'class java.lang.Integer' must be of type 'class java.lang.Long'
at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSe ttingDelegateSingleDataStatic.validate(EStructuralFeatureImp l.java:2131)
at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSe ttingDelegateSingleData.dynamicSet(EStructuralFeatureImpl.ja va:2056)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(Basi cEObjectImpl.java:1137)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1111)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1081)
at org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement.set(A SMEMFModelElement.java:510)
... 22 more

does anymone has an idea on how to solve this problem?

Thanks.
Re: [ATL] convert attribute type error [message #629290 is a reply to message #535524] Mon, 27 September 2010 16:53 Go to previous message
Marek Cyzio is currently offline Marek CyzioFriend
Messages: 2
Registered: August 2010
Junior Member
precision <- s.precision.longValue()
Previous Topic:[ATL]: max of floats
Next Topic:[ATL] casting of refImmediateComposite() needed ?
Goto Forum:
  


Current Time: Mon Sep 16 12:53:29 GMT 2019

Powered by FUDForum. Page generated in 0.02182 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top