Home » Archived » M2M (model-to-model transformation) » Injection problem in qATL
Injection problem in qATL [message #67381] |
Thu, 29 November 2007 03:32  |
Eclipse User |
|
|
|
Hi all, I have at first sight a basic problem, but after 2 days I didn't
even resolve it.
I am developing an HOT transformation that I want to call directly from
the weaving panel (as in qATL).
The problem is that when I try to inject ATL code into my resulting ATL
model, I get an exception (the stack trace of the
exception is attached at the end of the post).
I even tried to modify the SimpleATLtoATL.atl transformation of the
plug-in org.eclipse.gmt.weaver.qatl, but it did not work.
Notice that I modify ONLY the transformation, the source code of the
plug-in remains the same.
I modified only the following rule:
------------------------------------------------------------ -
rule InPatternElement {
from --elements of a model -- source Element
amw: AMW!InputElement
to
atl: ATL!InPattern (
elements <- element
),
element : ATL!SimpleInPatternElement(
varName <- amw.getVarName(),
type <- aType
),
-- -- creates a new model element because it may have repeated elements
aType : ATL!OclModelElement (
name <- thisModule.getLeftInstance(amw.element.ref).name,
model <-
thisModule.resolveTemp(AMW!InModelRef.allInstancesFrom('IN') - >select ( e |
true)->first(),'ametamodel')
)
}
-----------------------------------------------------------
to 'my rule':
------------------------------------------------------------
rule InPatternElement {
from --elements of a model -- source Element
amw: AMW!InputElement
to
atl: ATL!InPattern (
elements <- element,
filter <- 'true'.inject('OUT', 'ebnf2', 'ATL-oclExpression')
-- this is where the two rules differ
),
element : ATL!SimpleInPatternElement(
varName <- amw.getVarName(),
type <- aType
),
-- -- creates a new model element because it may have repeated elements
aType : ATL!OclModelElement (
name <- thisModule.getLeftInstance(amw.element.ref).name,
model <-
thisModule.resolveTemp(AMW!InModelRef.allInstancesFrom('IN') - >select ( e |
true)->first(),'ametamodel')
)
}
--------------------------------------------------------
Can anyone explain me why the injection does not work and how can I
resolve this problem?
Thanks, Ivano
The stack trace of the exception is:
GRAVE: ****** BEGIN Stack Trace
GRAVE: exception:
GRAVE: null
java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor88.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.eclipse.m2m.atl.engine.vm.ClassNativeOperation.exec(Clas sNativeOperation.java:59)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:133)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:91)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:230)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:133)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:91)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:230)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:325)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:133)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:91)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:230)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
at
org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:289)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:161)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:105)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:81)
at
org.eclipse.gmt.weaver.transformation.util.TransformationUti l.executeTransfo(TransformationUtil.java:103)
at
org.eclipse.gmt.weaver.transformation.panel.TransformationWe avingPanel$TAction.run(TransformationWeavingPanel.java:181)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:545)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:490)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:153)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 504)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
at org.eclipse.equinox.launcher.Main.main(Main.java:1144)
Caused by: java.lang.NullPointerException
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMString.inject(ASM String.java:287)
... 52 more
GRAVE: A.main() : ??#27 null
GRAVE: local variables = {self=SimpleATLtoATL : ASMModule}
GRAVE: local stack = []
GRAVE: A.__exec__() : ??#58 null
GRAVE: local variables = {e=TransientLink {rule = 'InPatternElement',
sourceElements = {amw = IN!SAcomponent}, targetElements = {element =
OUT!<unnamed>, aType = OUT!<notnamedyet>, atl = OUT!<unnamed>}, variables
= {}}, self=SimpleATLtoATL : ASMModule}
GRAVE: local stack = []
GRAVE: A.__applyInPatternElement(1 : NTransientLink;) : ??#28 138:15-138:65
GRAVE: local variables = {atl=OUT!<unnamed>, amw=IN!SAcomponent,
link=TransientLink {rule = 'InPatternElement', sourceElements = {amw =
IN!SAcomponent}, targetElements = {element = OUT!<unnamed>, aType =
OUT!<notnamedyet>, atl = OUT!<unnamed>}, variables = {}},
self=SimpleATLtoATL : ASMModule, aType=OUT!<notnamedyet>,
element=OUT!<unnamed>}
GRAVE: local stack = [OUT!<unnamed>, OUT!<unnamed>, SimpleATLtoATL :
ASMModule]
GRAVE: NativeOperation public static
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny
org.eclipse.m2m.atl.engine.vm.nativelib.ASMString.inject(org .eclipse.m2m.atl.engine.vm.StackFrame,org.eclipse.m2m.atl.en gine.vm.nativelib.ASMString,org.eclipse.m2m.atl.engine.vm.na tivelib.ASMString,org.eclipse.m2m.atl.engine.vm.nativelib.AS MString,org.eclipse.m2m.atl.engine.vm.nativelib.ASMString)
GRAVE: args = ['true', 'OUT', 'ebnf2', 'ATL-oclExpression']
GRAVE: ****** END Stack Trace
INFO: Execution terminated due to error (see launch configuration to allow
continuation after errors).
GRAVE: null
java.lang.RuntimeException
at
org.eclipse.m2m.atl.engine.vm.SimpleDebugger.error(SimpleDeb ugger.java:185)
at
org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:85)
at
org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:77)
at
org.eclipse.m2m.atl.engine.vm.ClassNativeOperation.exec(Clas sNativeOperation.java:67)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:133)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:91)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:230)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:133)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:91)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:230)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:325)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:133)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:91)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:230)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
at
org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:289)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:161)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:105)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:81)
at
org.eclipse.gmt.weaver.transformation.util.TransformationUti l.executeTransfo(TransformationUtil.java:103)
at
org.eclipse.gmt.weaver.transformation.panel.TransformationWe avingPanel$TAction.run(TransformationWeavingPanel.java:181)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:545)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:490)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:153)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 504)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
at org.eclipse.equinox.launcher.Main.main(Main.java:1144)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor88.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.eclipse.m2m.atl.engine.vm.ClassNativeOperation.exec(Clas sNativeOperation.java:59)
... 48 more
Caused by: java.lang.NullPointerException
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMString.inject(ASM String.java:287)
... 52 more
|
|
|
Re: [ATL] Injection problem in qATL [message #67692 is a reply to message #67381] |
Thu, 29 November 2007 18:29   |
Eclipse User |
|
|
|
Hello Ivano,
Could you please remember to prefix the subject of your ATL-related
posts to the M2M newsgroup with [ATL] as I did in this reply?
Additionally, your question may also be of interest to the AMW newsgroup
readers. Therefore, I added it in copy.
The problem you encountered seems to occur because injection of 'true'
cannot proceed. This may be because the ATL parser is not available in
the ant launch configuration classpath. You could try adding it.
Alternatively, you could also directly write the code that will create
the expression you want in the target pattern. For instance, to add 'true':
rule InPatternElement {
from --elements of a model -- source Element
amw: AMW!InputElement
to
atl: ATL!InPattern (
elements <- element,
filter <- filter
),
filter : ATL!BooleanExp (
booleanSymbol <- true
),
element : ATL!SimpleInPatternElement(
varName <- amw.getVarName(),
type <- aType
),
-- -- creates a new model element because it may have repeated
elements
aType : ATL!OclModelElement (
name <- thisModule.getLeftInstance(amw.element.ref).name,
model <-
thisModule.resolveTemp(AMW!InModelRef.allInstancesFrom('IN') - >select ( e
| true)->first(),'ametamodel')
)
}
You may not want to build your target pattern elements by just looking
at the metamodel. Then, you can write an ATL file (e.g., a query), and
inject it to see what elements you have to create.
Regards,
Frédéric Jouault
Ivano wrote:
> Hi all, I have at first sight a basic problem, but after 2 days I didn't
> even resolve it.
>
> I am developing an HOT transformation that I want to call directly from
> the weaving panel (as in qATL).
>
> The problem is that when I try to inject ATL code into my resulting ATL
> model, I get an exception (the stack trace of the exception is attached
> at the end of the post).
>
> I even tried to modify the SimpleATLtoATL.atl transformation of the
> plug-in org.eclipse.gmt.weaver.qatl, but it did not work.
>
> Notice that I modify ONLY the transformation, the source code of the
> plug-in remains the same.
>
> I modified only the following rule:
>
> ------------------------------------------------------------ -
> rule InPatternElement {
> from --elements of a model -- source Element
> amw: AMW!InputElement
> to
> atl: ATL!InPattern (
> elements <- element
> ),
> element : ATL!SimpleInPatternElement(
> varName <- amw.getVarName(),
> type <- aType
> ),
> -- -- creates a new model element because it may have repeated
> elements
> aType : ATL!OclModelElement (
> name <- thisModule.getLeftInstance(amw.element.ref).name,
> model <-
> thisModule.resolveTemp(AMW!InModelRef.allInstancesFrom('IN') - >select ( e
> | true)->first(),'ametamodel')
> )
> }
> -----------------------------------------------------------
>
> to 'my rule':
>
> ------------------------------------------------------------
> rule InPatternElement {
> from --elements of a model -- source Element
> amw: AMW!InputElement
> to
> atl: ATL!InPattern (
> elements <- element,
> filter <- 'true'.inject('OUT', 'ebnf2',
> 'ATL-oclExpression') -- this is where the two
> rules differ
> ),
> element : ATL!SimpleInPatternElement(
> varName <- amw.getVarName(),
> type <- aType
> ),
> -- -- creates a new model element because it may have repeated
> elements
> aType : ATL!OclModelElement (
> name <- thisModule.getLeftInstance(amw.element.ref).name,
> model <-
> thisModule.resolveTemp(AMW!InModelRef.allInstancesFrom('IN') - >select ( e
> | true)->first(),'ametamodel')
> )
> }
>
> --------------------------------------------------------
>
>
> Can anyone explain me why the injection does not work and how can I
> resolve this problem?
>
> Thanks, Ivano
>
>
> The stack trace of the exception is:
>
>
> GRAVE: ****** BEGIN Stack Trace
> GRAVE: exception: GRAVE: null
> java.lang.reflect.InvocationTargetException
> at sun.reflect.GeneratedMethodAccessor88.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.eclipse.m2m.atl.engine.vm.ClassNativeOperation.exec(Clas sNativeOperation.java:59)
>
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:133)
>
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:91)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:230)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:133)
>
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:91)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:230)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:325)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:133)
>
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:91)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:230)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
> at
> org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:289)
>
> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:161)
> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:105)
> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:81)
> at
> org.eclipse.gmt.weaver.transformation.util.TransformationUti l.executeTransfo(TransformationUtil.java:103)
>
> at
> org.eclipse.gmt.weaver.transformation.panel.TransformationWe avingPanel$TAction.run(TransformationWeavingPanel.java:181)
>
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:545)
>
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:490)
>
> at
> org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:402)
>
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
> at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:153)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 504)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1144)
> Caused by: java.lang.NullPointerException
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMString.inject(ASM String.java:287)
>
> ... 52 more
> GRAVE: A.main() : ??#27 null
> GRAVE: local variables = {self=SimpleATLtoATL : ASMModule}
> GRAVE: local stack = []
> GRAVE: A.__exec__() : ??#58 null
> GRAVE: local variables = {e=TransientLink {rule =
> 'InPatternElement', sourceElements = {amw = IN!SAcomponent},
> targetElements = {element = OUT!<unnamed>, aType = OUT!<notnamedyet>,
> atl = OUT!<unnamed>}, variables = {}}, self=SimpleATLtoATL : ASMModule}
> GRAVE: local stack = []
> GRAVE: A.__applyInPatternElement(1 : NTransientLink;) : ??#28 138:15-138:65
> GRAVE: local variables = {atl=OUT!<unnamed>, amw=IN!SAcomponent,
> link=TransientLink {rule = 'InPatternElement', sourceElements = {amw =
> IN!SAcomponent}, targetElements = {element = OUT!<unnamed>, aType =
> OUT!<notnamedyet>, atl = OUT!<unnamed>}, variables = {}},
> self=SimpleATLtoATL : ASMModule, aType=OUT!<notnamedyet>,
> element=OUT!<unnamed>}
> GRAVE: local stack = [OUT!<unnamed>, OUT!<unnamed>, SimpleATLtoATL :
> ASMModule]
> GRAVE: NativeOperation public static
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMString.inject(org .eclipse.m2m.atl.engine.vm.StackFrame,org.eclipse.m2m.atl.en gine.vm.nativelib.ASMString,org.eclipse.m2m.atl.engine.vm.na tivelib.ASMString,org.eclipse.m2m.atl.engine.vm.nativelib.AS MString,org.eclipse.m2m.atl.engine.vm.nativelib.ASMString)
>
> GRAVE: args = ['true', 'OUT', 'ebnf2', 'ATL-oclExpression']
> GRAVE: ****** END Stack Trace
> INFO: Execution terminated due to error (see launch configuration to
> allow continuation after errors).
> GRAVE: null
> java.lang.RuntimeException
> at
> org.eclipse.m2m.atl.engine.vm.SimpleDebugger.error(SimpleDeb ugger.java:185)
> at
> org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:85)
>
> at
> org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:77)
>
> at
> org.eclipse.m2m.atl.engine.vm.ClassNativeOperation.exec(Clas sNativeOperation.java:67)
>
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:133)
>
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:91)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:230)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:133)
>
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:91)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:230)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:325)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:133)
>
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:91)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:230)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:161)
> at
> org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:289)
>
> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:161)
> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:105)
> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:81)
> at
> org.eclipse.gmt.weaver.transformation.util.TransformationUti l.executeTransfo(TransformationUtil.java:103)
>
> at
> org.eclipse.gmt.weaver.transformation.panel.TransformationWe avingPanel$TAction.run(TransformationWeavingPanel.java:181)
>
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:545)
>
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:490)
>
> at
> org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:402)
>
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
> at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:153)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 504)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1144)
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.GeneratedMethodAccessor88.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.eclipse.m2m.atl.engine.vm.ClassNativeOperation.exec(Clas sNativeOperation.java:59)
>
> ... 48 more
> Caused by: java.lang.NullPointerException
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMString.inject(ASM String.java:287)
>
> ... 52 more
>
>
>
>
>
|
|
| | |
Re: [ATL] Injection problem in qATL [message #68199 is a reply to message #68129] |
Tue, 04 December 2007 11:32   |
Eclipse User |
|
|
|
Originally posted by: mddfabro.ilog.fr
Hi Ivano,
Did you try to execute the transformation using an ATL launch
configuration, ie, outside from the plug-in?
You can do that by copying the transformation into your workspace and
setting up your input and output models as it is done for other ATL
transformations.
This would help us to verify if the problem comes from the AMW calls to
the ATL transformations or if it is a more general problem.
Regards,
Marcos.
ivano wrote:
> Hi all, I have edited the source HOT transformation SimpleAtl2ATL from
> the plug-in qATL to graphically develope ATL transformations.
>
> All works fine, but if I try to inject something I get NullPointer
> Exceptions.
>
> For example I tried to inject a simple condition into every rule:
>
> atl.filter <- 'true'.inject('OUT', 'ebnf2', 'ATL-oclExpression');
>
>
> Does anyone know why I cannot use injection direclty from AMW?
>
> Regards, Ivano
>
|
|
|
Re: [ATL] Injection problem in qATL [message #68223 is a reply to message #68199] |
Wed, 05 December 2007 03:47   |
Eclipse User |
|
|
|
Hi Marcos, I have just tried the modified simpleATL2ATL transformation
outside AMW and it all worked fine.
I hope it is only a configuration issue, I think that AMW does not find
ebnf injector, but it is only a hypothesis...
Regards, Ivano
Marcos Didonet Del Fabro wrote:
> Hi Ivano,
> Did you try to execute the transformation using an ATL launch
> configuration, ie, outside from the plug-in?
> You can do that by copying the transformation into your workspace and
> setting up your input and output models as it is done for other ATL
> transformations.
> This would help us to verify if the problem comes from the AMW calls to
> the ATL transformations or if it is a more general problem.
> Regards,
> Marcos.
> ivano wrote:
>> Hi all, I have edited the source HOT transformation SimpleAtl2ATL from
>> the plug-in qATL to graphically develope ATL transformations.
>>
>> All works fine, but if I try to inject something I get NullPointer
>> Exceptions.
>>
>> For example I tried to inject a simple condition into every rule:
>>
>> atl.filter <- 'true'.inject('OUT', 'ebnf2', 'ATL-oclExpression');
>>
>>
>> Does anyone know why I cannot use injection direclty from AMW?
>>
>> Regards, Ivano
>>
|
|
|
Re: [ATL] Injection problem in qATL [message #69422 is a reply to message #68223] |
Thu, 13 December 2007 03:38   |
Eclipse User |
|
|
|
Hi Marcos, would you try to inject ATL code as I did (unsuccesfully :/ )?
It is a very important feature of my transformations and It still does not
work...
Regard, Ivano
ivano wrote:
> Hi Marcos, I have just tried the modified simpleATL2ATL transformation
> outside AMW and it all worked fine.
> I hope it is only a configuration issue, I think that AMW does not find
> ebnf injector, but it is only a hypothesis...
> Regards, Ivano
> Marcos Didonet Del Fabro wrote:
>> Hi Ivano,
>> Did you try to execute the transformation using an ATL launch
>> configuration, ie, outside from the plug-in?
>> You can do that by copying the transformation into your workspace and
>> setting up your input and output models as it is done for other ATL
>> transformations.
>> This would help us to verify if the problem comes from the AMW calls to
>> the ATL transformations or if it is a more general problem.
>> Regards,
>> Marcos.
>> ivano wrote:
>>> Hi all, I have edited the source HOT transformation SimpleAtl2ATL from
>>> the plug-in qATL to graphically develope ATL transformations.
>>>
>>> All works fine, but if I try to inject something I get NullPointer
>>> Exceptions.
>>>
>>> For example I tried to inject a simple condition into every rule:
>>>
>>> atl.filter <- 'true'.inject('OUT', 'ebnf2', 'ATL-oclExpression');
>>>
>>>
>>> Does anyone know why I cannot use injection direclty from AMW?
>>>
>>> Regards, Ivano
>>>Hi Marcos,
|
|
|
Re: [ATL] Injection problem in qATL [message #69443 is a reply to message #69422] |
Thu, 13 December 2007 04:29   |
Eclipse User |
|
|
|
Originally posted by: mddfabro.ilog.fr
Hi Ivano,
the problem was that the AMW model handler did not have a modelLoader
associated with it, thus it could not load the ebnf2 injector.
I changed the code by associating an EMF model loader with the AMW model
handler. This code will be refactored later.
I tested here with these modifications and it worked well. You can check
out the amw4atl plug-in from the CVS to verify if it works for you.
Regards,
Marcos.
Ivano wrote:
> Hi Marcos, would you try to inject ATL code as I did (unsuccesfully :/ )?
> It is a very important feature of my transformations and It still does
> not work...
>
> Regard, Ivano
>
> ivano wrote:
>
>> Hi Marcos, I have just tried the modified simpleATL2ATL transformation
>> outside AMW and it all worked fine.
>> I hope it is only a configuration issue, I think that AMW does not
>> find ebnf injector, but it is only a hypothesis...
>
>> Regards, Ivano
>
>> Marcos Didonet Del Fabro wrote:
>
>>> Hi Ivano,
>
>>> Did you try to execute the transformation using an ATL launch
>>> configuration, ie, outside from the plug-in?
>
>>> You can do that by copying the transformation into your workspace and
>>> setting up your input and output models as it is done for other ATL
>>> transformations.
>
>>> This would help us to verify if the problem comes from the AMW calls
>>> to the ATL transformations or if it is a more general problem.
>
>>> Regards,
>
>>> Marcos.
>
>
>>> ivano wrote:
>>>> Hi all, I have edited the source HOT transformation SimpleAtl2ATL
>>>> from the plug-in qATL to graphically develope ATL transformations.
>>>>
>>>> All works fine, but if I try to inject something I get NullPointer
>>>> Exceptions.
>>>>
>>>> For example I tried to inject a simple condition into every rule:
>>>>
>>>> atl.filter <- 'true'.inject('OUT', 'ebnf2', 'ATL-oclExpression');
>>>>
>>>>
>>>> Does anyone know why I cannot use injection direclty from AMW?
>>>>
>>>> Regards, Ivano
>>>> Hi Marcos,
>
|
|
| |
Re: [ATL] Injection problem in qATL [message #70169 is a reply to message #69443] |
Sat, 22 December 2007 11:31   |
Eclipse User |
|
|
|
Hi Marcos,
I finally checked out the amw4atl plug-in from the CVS and everything
worked
well, thank you very much.
I hope I will not bother you with this issues!
Regards, Ivano
Marcos Didonet Del Fabro wrote:
> Hi Ivano,
> the problem was that the AMW model handler did not have a modelLoader
> associated with it, thus it could not load the ebnf2 injector.
> I changed the code by associating an EMF model loader with the AMW model
> handler. This code will be refactored later.
> I tested here with these modifications and it worked well. You can check
> out the amw4atl plug-in from the CVS to verify if it works for you.
> Regards,
> Marcos.
> Ivano wrote:
>> Hi Marcos, would you try to inject ATL code as I did (unsuccesfully :/ )?
>> It is a very important feature of my transformations and It still does
>> not work...
>>
>> Regard, Ivano
>>
>> ivano wrote:
>>
>>> Hi Marcos, I have just tried the modified simpleATL2ATL transformation
>>> outside AMW and it all worked fine.
>>> I hope it is only a configuration issue, I think that AMW does not
>>> find ebnf injector, but it is only a hypothesis...
>>
>>> Regards, Ivano
>>
>>> Marcos Didonet Del Fabro wrote:
>>
>>>> Hi Ivano,
>>
>>>> Did you try to execute the transformation using an ATL launch
>>>> configuration, ie, outside from the plug-in?
>>
>>>> You can do that by copying the transformation into your workspace and
>>>> setting up your input and output models as it is done for other ATL
>>>> transformations.
>>
>>>> This would help us to verify if the problem comes from the AMW calls
>>>> to the ATL transformations or if it is a more general problem.
>>
>>>> Regards,
>>
>>>> Marcos.
>>
>>
>>>> ivano wrote:
>>>>> Hi all, I have edited the source HOT transformation SimpleAtl2ATL
>>>>> from the plug-in qATL to graphically develope ATL transformations.
>>>>>
>>>>> All works fine, but if I try to inject something I get NullPointer
>>>>> Exceptions.
>>>>>
>>>>> For example I tried to inject a simple condition into every rule:
>>>>>
>>>>> atl.filter <- 'true'.inject('OUT', 'ebnf2', 'ATL-oclExpression');
>>>>>
>>>>>
>>>>> Does anyone know why I cannot use injection direclty from AMW?
>>>>>
>>>>> Regards, Ivano
|
|
| |
Re: [ATL] Injection problem in qATL [message #70429 is a reply to message #70230] |
Fri, 04 January 2008 07:42   |
Eclipse User |
|
|
|
Originally posted by: mddfabro.ilog.fr
Hi Ivano,
the code of the rules with error are in 'normal' ATL files or the code
is injected using the .inject ('OUT','ebnf', <exp>) method?
There are two things to pay attention when developing called and lazy rules:
- in called rules, you should have a return expression at the end of the
imperative part;
- in lazy rules, the type of the input pattern should be respected.
Regards,
Marcos
Ivano wrote:
> Hi Marcos, I am using the modified version of AMW4ATL and I still have
> problems:
> when a called rule (that returns something) is executed I get an
> EmptyStack exception;
>
> when a lazy rule is executed I get an ClassCastException;
>
> These exceptions arise only if I use the modified version of AMW4ATL, do
> you have any idea about this issue??
>
> Thank you, Ivano
>
>
|
|
|
Re: [ATL] Injection problem in qATL [message #70505 is a reply to message #70429] |
Sat, 05 January 2008 09:45   |
Eclipse User |
|
|
|
Hi Marcos, this is one of my rules:
rule createBinding(featName : MOF!"String", element :
ATL!SimpleOutPatternElement, var : ATL!VariableDeclaration) { -- :
ATL!Binding
to
atl : ATL!Binding(
outPatternElement <- element,
propertyName <- featName,
value <- val
),
val : ATL!NavigationOrAttributeCallExp(
name <- featName,
source <- valSource
),
valSource : ATL!VariableExp(
referredVariable <- var
)
do {
atl;
}
}
The calling of the rule works, but somewhere in the return elements goes
wrong;
in fact everything works if I remove the "to" section of the rule and I
print the input parameters in the "do" section.
I ask this to you, because I tested the same rule with the old AMW4ATL and
everything works correctly...
Do you have any suggestion?
Regards, Ivano
Marcos Didonet Del Fabro wrote:
> Hi Ivano,
> the code of the rules with error are in 'normal' ATL files or the code
> is injected using the .inject ('OUT','ebnf', <exp>) method?
> There are two things to pay attention when developing called and lazy rules:
> - in called rules, you should have a return expression at the end of the
> imperative part;
> - in lazy rules, the type of the input pattern should be respected.
> Regards,
> Marcos
> Ivano wrote:
>> Hi Marcos, I am using the modified version of AMW4ATL and I still have
>> problems:
>> when a called rule (that returns something) is executed I get an
>> EmptyStack exception;
>>
>> when a lazy rule is executed I get an ClassCastException;
>>
>> These exceptions arise only if I use the modified version of AMW4ATL, do
>> you have any idea about this issue??
>>
>> Thank you, Ivano
>>
>>
|
|
|
Re: [ATL] Injection problem in qATL [message #70636 is a reply to message #70505] |
Mon, 07 January 2008 04:36  |
Eclipse User |
|
|
|
Originally posted by: mddfabro.ilog.fr
Hi Ivano,
I didn't manage to reproduce the error here.
I will investigate it with different examples and configurations. I keep
you informed.
Cheers,
Marcos.
Ivano wrote:
> Hi Marcos, this is one of my rules:
>
> rule createBinding(featName : MOF!"String", element :
> ATL!SimpleOutPatternElement, var : ATL!VariableDeclaration) { -- :
> ATL!Binding
> to
> atl : ATL!Binding(
> outPatternElement <- element,
> propertyName <- featName,
> value <- val
> ),
> val : ATL!NavigationOrAttributeCallExp(
> name <- featName, source <- valSource
> ),
> valSource : ATL!VariableExp(
> referredVariable <- var
> )
> do {
> atl;
> }
> }
>
> The calling of the rule works, but somewhere in the return elements goes
> wrong;
> in fact everything works if I remove the "to" section of the rule and I
> print the input parameters in the "do" section.
>
> I ask this to you, because I tested the same rule with the old AMW4ATL
> and everything works correctly...
>
> Do you have any suggestion?
>
> Regards, Ivano
> Marcos Didonet Del Fabro wrote:
>
>> Hi Ivano,
>
>> the code of the rules with error are in 'normal' ATL files or the code
>> is injected using the .inject ('OUT','ebnf', <exp>) method?
>
>> There are two things to pay attention when developing called and lazy
>> rules:
>
>> - in called rules, you should have a return expression at the end of
>> the imperative part;
>
>> - in lazy rules, the type of the input pattern should be respected.
>
>
>> Regards,
>
>> Marcos
>
>> Ivano wrote:
>>> Hi Marcos, I am using the modified version of AMW4ATL and I still
>>> have problems:
>>> when a called rule (that returns something) is executed I get an
>>> EmptyStack exception;
>>>
>>> when a lazy rule is executed I get an ClassCastException;
>>>
>>> These exceptions arise only if I use the modified version of AMW4ATL,
>>> do you have any idea about this issue??
>>>
>>> Thank you, Ivano
>>>
>>>
>
|
|
|
Goto Forum:
Current Time: Thu May 08 18:16:10 EDT 2025
Powered by FUDForum. Page generated in 0.06344 seconds
|