Closed MapleRabbit closed 8 years ago
Can you please provide more details about what you're trying to do? What do you mean by "standalone"? Also, can you post the complete stacktrace for the exception?
Thank you and sorry for the later reply. I followed the doc on atl transformation here http://wiki.eclipse.org/ATL/User_Guide_-_The_ATL_Tools#ATL_Plugins to create an atl plugin (jar) in order to use the atl transformation in tool chain.
And by doing so I got a new auto-generated atl-plugin project. Here is the stack trace while execute the java file containing the main method which invokes the transformation:
org.eclipse.m2m.atl.engine.emfvm.VMException: Exception during invocation of operation getPropertyValues on org.osate.aadl2.impl.ThreadImplementationImpl@1e75d13 (name: Thread1.impl) (noPrototypes: false, noAnnexes: false, noProperties: false) (derivedModes: false, noFlows: false, noModes: false) (noSubcomponents: false, noConnections: false, noCalls: false)
Java Stack:
org.eclipse.m2m.atl.engine.emfvm.VMException: Exception during invocation of operation getPropertyValues on org.osate.aadl2.impl.ThreadImplementationImpl@1e75d13 (name: Thread1.impl) (noPrototypes: false, noAnnexes: false, noProperties: false) (derivedModes: false, noFlows: false, noModes: false) (noSubcomponents: false, noConnections: false, noCalls: false)
at org.eclipse.m2m.atl.engine.emfvm.adapter.EMFModelAdapter.invoke(EMFModelAdapter.java:767)
at org.eclipse.m2m.atl.engine.emfvm.ASMOperation.exec(ASMOperation.java:425)
at org.eclipse.m2m.atl.engine.emfvm.ASMOperation.exec(ASMOperation.java:388)
at org.eclipse.m2m.atl.engine.emfvm.ASMOperation.exec(ASMOperation.java:388)
at org.eclipse.m2m.atl.engine.emfvm.ASMOperation.exec(ASMOperation.java:388)
at org.eclipse.m2m.atl.engine.emfvm.ASM.run(ASM.java:208)
at org.eclipse.m2m.atl.engine.emfvm.launch.EMFVMLauncher.internalLaunch(EMFVMLauncher.java:170)
at org.eclipse.m2m.atl.engine.emfvm.launch.EMFVMLauncher.launch(EMFVMLauncher.java:139)
at org.eclipse.m2m.atl.sample4.files.AADL2XML.doAADL2XML(AADL2XML.java:160)
at org.eclipse.m2m.atl.sample4.files.AADL2XML.main(AADL2XML.java:79)
Caused by: java.lang.NullPointerException
at org.osate.aadl2.operations.NamedElementOperations.getPropertyValues(NamedElementOperations.java:438)
at org.osate.aadl2.impl.NamedElementImpl.getPropertyValues(NamedElementImpl.java:764)
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.emfvm.adapter.EMFModelAdapter.invoke(EMFModelAdapter.java:760)
... 9 more
Transformation without using predeclared properties works fine, so i guess maybe its about the build path for project "Plugin_Resources".
The atl transformation code:
lazy rule threadImplementationRule {
from
sourceThreadImplementation: AADL2!ThreadImplementation
to
threadTemplate: XML!UserDefinedProp (
deadline <- sourceThreadImplementation.getPropertyValues('Timing_Properties', 'Deadline')
)
}
The issue seems to be about the interaction of OSATE and ATL, but I don't see a bug in OSATE. I suggest you ask this question on the AADL mailing list. Maybe someone on the list has used ATL successfully in a similar scenario.
@MapleRabbit Hi, I am trying to doing the same thing. I am working in turing AADL to TASM&UPPAAL in ATL, and I can not get property of AADL with ATL. Now Can you have way to solve it? Thanks.
@magichan As far as I know it will be fine as long as you access those API from inside the OSATE environment. The service only works for this environment. I've check the source code back then and the conclusion is that they haven't implemented the service for accessing from outside. I'm not sure about this but the comments they leaved in the source code said so.
The transformation VM throws as follows when packed as ATL-Plugin org.eclipse.m2m.atl.engine.emfvm.VMException: Exception during invocation of operation getPropertyValues
the original ATL transformation works fine (while project "Plugin_Resources" is opened)