Home » Archived » M2M (model-to-model transformation) » [ATL] Set an attribute mixed (EFeatureMapEntry)
[ATL] Set an attribute mixed (EFeatureMapEntry) [message #87241] |
Fri, 01 August 2008 09:27  |
Eclipse User |
|
|
|
Originally posted by: bch.bluexml.com
Hi,
I have in my metamodel a metaclass "LabelType" with a reference called
mixed (of type EFeatureMapEntry). I search to set it with ATL but I have
an error.
My transformation is :
-- @atlcompiler atl2006
module rwm2xforms; -- Module Template
create OUT : XFORMS from IN : RWM;
rule entity {
from s : RWM!Entity
to t : XFORMS!TriggerType (
label <- l
),
xmltype : XFORMS!XMLTypeDocumentRoot (
text <- 'xxx2'
),
l : XFORMS!LabelType(
mixed <- xmltype.mixed
)
}
My error is :
GRAVE: ****** BEGIN Stack Trace
GRAVE: message: cannot set feature XFORMS!XMLTypeDocumentRoot.text to
value xxx2
GRAVE: exception:
GRAVE: java.lang.String
java.lang.ClassCastException: java.lang.String
at
org.eclipse.emf.ecore.xml.type.impl.XMLTypeDocumentRootImpl. eSet(XMLTypeDocumentRootImpl.java:260)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1061)
at
org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement.set(A SMEMFModelElement.java:293)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:305)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:338)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
at
org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:299)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:169)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:111)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:87)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:426)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:398)
at
org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:42)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:759)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
at
org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
at
org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
GRAVE: A.main() : ??#24 null
GRAVE: local variables = {self=rwm2xforms : ASMModule}
GRAVE: local stack = []
GRAVE: A.__exec__() : ??#8 null
GRAVE: local variables = {self=rwm2xforms : ASMModule, e=TransientLink
{rule = 'entity', sourceElements = {s = IN!Groupe}, targetElements =
{xmltype = OUT!<unnamed>, t = OUT!<unnamed>, l = OUT!<unnamed>},
variables = {}}}
GRAVE: local stack = []
GRAVE: A.__applyentity(1 : NTransientLink;) : ??#28 11:6-11:20
GRAVE: local variables = {t=OUT!<unnamed>, l=OUT!<unnamed>,
s=IN!Groupe, self=rwm2xforms : ASMModule, xmltype=OUT!<unnamed>,
link=TransientLink {rule = 'entity', sourceElements = {s = IN!Groupe},
targetElements = {xmltype = OUT!<unnamed>, t = OUT!<unnamed>, l =
OUT!<unnamed>}, variables = {}}}
GRAVE: local stack = [OUT!<unnamed>]
GRAVE: ****** END Stack Trace
|
|
|
Re: [ATL] Set an attribute mixed (EFeatureMapEntry) [message #87284 is a reply to message #87241] |
Mon, 04 August 2008 05:18   |
Eclipse User |
|
|
|
Hi,
Your error comes probably from the type of the text attribute of
XFORMS!XMLTypeDocumentRoot. It is propbably not a String attribute in
your metamodel, so you can not set it to the string value 'xxx2'.
It can be why you get a ClassCastException on line 11.
Hope this helps.
Best regards,
Guillaume
Benjamin CHEVALLEREAU a écrit :
> Hi,
>
> I have in my metamodel a metaclass "LabelType" with a reference called
> mixed (of type EFeatureMapEntry). I search to set it with ATL but I have
> an error.
>
> My transformation is :
>
> -- @atlcompiler atl2006
> module rwm2xforms; -- Module Template
> create OUT : XFORMS from IN : RWM;
>
> rule entity {
> from s : RWM!Entity
> to t : XFORMS!TriggerType (
> label <- l
> ),
> xmltype : XFORMS!XMLTypeDocumentRoot (
> text <- 'xxx2'
> ),
> l : XFORMS!LabelType(
> mixed <- xmltype.mixed
> )
> }
>
> My error is :
>
> GRAVE: ****** BEGIN Stack Trace
> GRAVE: message: cannot set feature XFORMS!XMLTypeDocumentRoot.text
> to value xxx2
> GRAVE: exception:
> GRAVE: java.lang.String
> java.lang.ClassCastException: java.lang.String
> at
> org.eclipse.emf.ecore.xml.type.impl.XMLTypeDocumentRootImpl. eSet(XMLTypeDocumentRootImpl.java:260)
>
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1061)
>
> at
> org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement.set(A SMEMFModelElement.java:293)
>
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:305)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
>
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
>
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:338)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
>
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
>
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
> at
> org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:299)
>
> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:169)
> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:111)
> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:87)
> at
> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>
> at
> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:426)
>
> at
> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:398)
>
> at
> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:42)
>
> at
> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:759)
>
> at
> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>
> at
> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>
> at
> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> GRAVE: A.main() : ??#24 null
> GRAVE: local variables = {self=rwm2xforms : ASMModule}
> GRAVE: local stack = []
> GRAVE: A.__exec__() : ??#8 null
> GRAVE: local variables = {self=rwm2xforms : ASMModule,
> e=TransientLink {rule = 'entity', sourceElements = {s = IN!Groupe},
> targetElements = {xmltype = OUT!<unnamed>, t = OUT!<unnamed>, l =
> OUT!<unnamed>}, variables = {}}}
> GRAVE: local stack = []
> GRAVE: A.__applyentity(1 : NTransientLink;) : ??#28 11:6-11:20
> GRAVE: local variables = {t=OUT!<unnamed>, l=OUT!<unnamed>,
> s=IN!Groupe, self=rwm2xforms : ASMModule, xmltype=OUT!<unnamed>,
> link=TransientLink {rule = 'entity', sourceElements = {s = IN!Groupe},
> targetElements = {xmltype = OUT!<unnamed>, t = OUT!<unnamed>, l =
> OUT!<unnamed>}, variables = {}}}
> GRAVE: local stack = [OUT!<unnamed>]
> GRAVE: ****** END Stack Trace
|
|
|
Re: [ATL] Set an attribute mixed (EFeatureMapEntry) [message #87318 is a reply to message #87284] |
Mon, 04 August 2008 08:22  |
Eclipse User |
|
|
|
Originally posted by: bch.bluexml.com
Hi,
Thanks for your response but I work from :
* this discusion :
http://www.sciences.univ-nantes.fr/lina/atl/www/atl_discussi on_archive/1729.html
* this resolved bug : https://bugs.eclipse.org/bugs/show_bug.cgi?id=156094
It seems that XMLTypeDocumentRoot is contained by EMF. This metaclass is
not present in my metamodel.
Guillaume Doux a écrit :
> Hi,
>
> Your error comes probably from the type of the text attribute of
> XFORMS!XMLTypeDocumentRoot. It is propbably not a String attribute in
> your metamodel, so you can not set it to the string value 'xxx2'.
>
> It can be why you get a ClassCastException on line 11.
>
> Hope this helps.
>
> Best regards,
>
> Guillaume
>
> Benjamin CHEVALLEREAU a écrit :
>> Hi,
>>
>> I have in my metamodel a metaclass "LabelType" with a reference called
>> mixed (of type EFeatureMapEntry). I search to set it with ATL but I
>> have an error.
>>
>> My transformation is :
>>
>> -- @atlcompiler atl2006
>> module rwm2xforms; -- Module Template
>> create OUT : XFORMS from IN : RWM;
>>
>> rule entity {
>> from s : RWM!Entity
>> to t : XFORMS!TriggerType (
>> label <- l
>> ),
>> xmltype : XFORMS!XMLTypeDocumentRoot (
>> text <- 'xxx2'
>> ),
>> l : XFORMS!LabelType(
>> mixed <- xmltype.mixed
>> )
>> }
>>
>> My error is :
>>
>> GRAVE: ****** BEGIN Stack Trace
>> GRAVE: message: cannot set feature XFORMS!XMLTypeDocumentRoot.text
>> to value xxx2
>> GRAVE: exception:
>> GRAVE: java.lang.String
>> java.lang.ClassCastException: java.lang.String
>> at
>> org.eclipse.emf.ecore.xml.type.impl.XMLTypeDocumentRootImpl. eSet(XMLTypeDocumentRootImpl.java:260)
>>
>> at
>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1061)
>>
>> at
>> org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModelElement.set(A SMEMFModelElement.java:293)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:305)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
>> at
>> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:338)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
>> at
>> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
>>
>> at
>> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
>> at
>> org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:299)
>>
>> at
>> org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:169)
>> at
>> org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:111)
>> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:87)
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:426)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:398)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:42)
>>
>> at
>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:759)
>>
>> at
>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>
>> at
>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>
>> at
>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>
>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>> GRAVE: A.main() : ??#24 null
>> GRAVE: local variables = {self=rwm2xforms : ASMModule}
>> GRAVE: local stack = []
>> GRAVE: A.__exec__() : ??#8 null
>> GRAVE: local variables = {self=rwm2xforms : ASMModule,
>> e=TransientLink {rule = 'entity', sourceElements = {s = IN!Groupe},
>> targetElements = {xmltype = OUT!<unnamed>, t = OUT!<unnamed>, l =
>> OUT!<unnamed>}, variables = {}}}
>> GRAVE: local stack = []
>> GRAVE: A.__applyentity(1 : NTransientLink;) : ??#28 11:6-11:20
>> GRAVE: local variables = {t=OUT!<unnamed>, l=OUT!<unnamed>,
>> s=IN!Groupe, self=rwm2xforms : ASMModule, xmltype=OUT!<unnamed>,
>> link=TransientLink {rule = 'entity', sourceElements = {s = IN!Groupe},
>> targetElements = {xmltype = OUT!<unnamed>, t = OUT!<unnamed>, l =
>> OUT!<unnamed>}, variables = {}}}
>> GRAVE: local stack = [OUT!<unnamed>]
>> GRAVE: ****** END Stack Trace
|
|
|
Goto Forum:
Current Time: Wed Jul 23 10:45:00 EDT 2025
Powered by FUDForum. Page generated in 0.03777 seconds
|