Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Running ATL programmatically
[ATL] Running ATL programmatically [message #553898] Thu, 19 August 2010 07:19 Go to next message
Jorge Carballo is currently offline Jorge Carballo
Messages: 7
Registered: July 2010
Junior Member
Hi,

I have an ATL transformation that run correctly, but when I use that with Command-line interface from Dennis Wagelaar ... fails.

A simple transformation runs OK, but when the ATL transformation have some more complicated, like ...

...
result <- s.getNameResultSet()->collect(e | thisModule.Result(e))
...


the ATL file runs perfectly, but the Command-line interface from Dennis Wagelaar fails when I call "launch", specifically at AtlLauncher.class:

...
ASMInterpreter ai = new ASMInterpreter(asm, asmModule, env, asmParams);
...


org.eclipse.m2m.atl.engine.vm.VMExceptionorg.eclipse.m2m.atl.engine.vm.VMException
NativeOperation public static org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.debug(org.eclipse.m2m.atl.engine.vm.StackFrame,org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny,org.eclipse.m2m.atl.engine.vm.nativelib.ASMString)
	args = ['']
Java Stack:
org.eclipse.m2m.atl.engine.vm.VMException
	at org.eclipse.m2m.atl.engine.vm.SimpleDebugger.error(SimpleDebugger.java:167)
	at org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(StackFrame.java:95)
	at org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(StackFrame.java:87)
	at org.eclipse.m2m.atl.engine.vm.ClassNativeOperation.exec(ClassNativeOperation.java:73)
	at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:130)
	at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:78)
	at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:251)
	at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:173)
	at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:130)
	at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:78)
	at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:251)
	at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:173)
	at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:130)
	at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:78)
	at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:251)
	at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:173)
	at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:130)
	at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:78)
	at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:251)
	at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:357)
	at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:173)
	at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:130)
	at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:78)
	at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:251)
	at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:357)
	at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:173)
	at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:130)
	at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:78)
	at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.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.engine.vm.AtlLauncher.launch(AtlLauncher.java:216)
	at org.eclipse.m2m.atl.engine.vm.AtlLauncher.launch(AtlLauncher.java:127)
	at org.eclipse.m2m.atl.engine.vm.AtlLauncher.launch(AtlLauncher.java:92)
	at com.example.atl.commandline.Main.run(Main.java:340)
	at com.example.atl.commandline.Main.main(Main.java:109)
Caused by: java.lang.IllegalArgumentException: wrong number of arguments
	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.m2m.atl.engine.vm.ClassNativeOperation.exec(ClassNativeOperation.java:69)
	... 32 more




I use these libraries:

ATL-parser.jar
ebnfextractor.jar
ebnfinjector.jar
org.antlr.runtime_3.0.0.v200803061811.jar
org.atl.eclipse.engine.jar
org.eclipse.core.jobs_3.5.0.v20100515.jar
org.eclipse.core.resources_3.6.0.v20100526-0737.jar
org.eclipse.core.runtime_3.6.0.v20100505.jar
org.eclipse.core.runtime.compatibility_3.2.100.v20100505.jar
org.eclipse.emf.common_2.6.0.v20100614-1136.jar
org.eclipse.emf.ecore_2.6.0.v20100614-1136.jar
org.eclipse.emf.ecore.xmi_2.5.0.v20100521-1846.jar
org.eclipse.equinox.common_3.6.0.v20100503.jar
org.eclipse.m2m.atl.common_3.1.0.v201006150240.jar
org.eclipse.m2m.atl.core_3.1.0.v201006150240.jar
org.eclipse.m2m.atl.core.emf_3.1.0.v201006150240.jar
org.eclipse.m2m.atl.drivers.emf4atl_3.1.0.v201006150240.jar
org.eclipse.m2m.atl.engine_3.1.0.v201006150240.jar
org.eclipse.m2m.atl.engine.emfvm_3.1.0.v201006150240.jar
org.eclipse.m2m.atl.engine.source_3.1.0.v201006150240.jar
org.eclipse.m2m.atl.engine.vm_3.1.0.v201006150240.jar
org.eclipse.m2m.atl.engine.vm.source_3.1.0.v201006150240.jar
org.eclipse.osgi_3.6.0.v20100517.jar
vm.jar


Regards,
Jorge.
Re: [ATL] Running ATL programmatically [message #554788 is a reply to message #553898] Tue, 24 August 2010 08:11 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis Wagelaar
Messages: 147
Registered: July 2009
Senior Member
Op 19-08-10 13:19, Jorge schreef:
> Hi,
>
> I have an ATL transformation that run correctly, but when I use that
> with Command-line interface from Dennis Wagelaar ... fails.
>
> A simple transformation runs OK, but when the ATL transformation have
> some more complicated, like ...
>
> result <- s.getNameResultSet()->collect(e | thisModule.Result(e))
>
> the ATL file runs perfectly, but the Command-line interface from Dennis
> Wagelaar fails when I call "launch", specifically at AtlLauncher.class:
>
> org.eclipse.m2m.atl.engine.vm.VMExceptionorg.eclipse.m2m.atl .engine.vm.VMException
>
> NativeOperation public static
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.debug(org. eclipse.m2m.atl.engine.vm.StackFrame,org.eclipse.m2m.atl.eng ine.vm.nativelib.ASMOclAny,org.eclipse.m2m.atl.engine.vm.nat ivelib.ASMString)
>
> args = ['']
> Java Stack:
> org.eclipse.m2m.atl.engine.vm.VMException
> Caused by: java.lang.IllegalArgumentException: wrong number of arguments
> 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.m2m.atl.engine.vm.ClassNativeOperation.exec(Clas sNativeOperation.java:69)
>
> Regards,
> Jorge.

Hmm, looks like different methods are invoked from the command line and in
Eclipse. Can you file a bug report, in which you attach/link the Eclipse
project that allows us to reproduce your issue?

Thanks already,
Dennis
Re: [ATL] Running ATL programmatically [message #758475 is a reply to message #554788] Wed, 23 November 2011 07:15 Go to previous message
Pedro  is currently offline Pedro
Messages: 1
Registered: November 2011
Junior Member
Is there a solution for this this problem?
Im trying to run a Atl launch programatically with two differents input models with the same metamodel and im getting the same error.
Instead of having the same cause im having this:
argument type mismatch. Is there a solution for that?
What can be wrong?

org.eclipse.m2m.atl.engine.vm.VMException
NativeOperation public static org.eclipse.m2m.atl.engine.vm.nativelib.ASMSet org.eclipse.m2m.atl.engine.vm.nativelib.ASMSet.asSet(org.eclipse.m2m.atl.engine.vm.StackFrame,org.eclipse.m2m.atl.engine.vm.nativelib.ASMSet)
args = [OrderedSet {IN!pedro}]
Java Stack:
org.eclipse.m2m.atl.engine.vm.VMException
at org.eclipse.m2m.atl.engine.vm.SimpleDebugger.error(SimpleDebugger.java:167)
at org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(StackFrame.java:95)
at org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(StackFrame.java:87)
at org.eclipse.m2m.atl.engine.vm.ClassNativeOperation.exec(ClassNativeOperation.java:73)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:130)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:78)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:251)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:173)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:130)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:78)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:251)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:173)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:130)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:78)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:251)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.java:357)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation.java:173)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:130)
at org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASMOclAny.java:78)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOperation.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.engine.vm.AtlLauncher.launch(AtlLauncher.java:216)
at org.eclipse.m2m.atl.engine.vm.AtlLauncher.launch(AtlLauncher.java:127)
at org.eclipse.m2m.atl.engine.vm.AtlLauncher.launch(AtlLauncher.java:92)
at ATLTransformation.launchTransformation(ATLTransformation.java:87)
at ATLTransformation.main(ATLTransformation.java:101)
Caused by: java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.m2m.atl.engine.vm.ClassNativeOperation.exec(ClassNativeOperation.java:69)
... 23 more

[Updated on: Wed, 23 November 2011 07:18]

Report message to a moderator

Previous Topic:[ATL] Use more than one instance
Next Topic:[ATL] Referenced part does not exist yet: org.eclipse.jdt.ui.PackageExplorer.
Goto Forum:
  


Current Time: Tue Jul 29 13:10:18 EDT 2014

Powered by FUDForum. Page generated in 0.06803 seconds