|
|
|
|
Re: call transformation from Java API [message #911896 is a reply to message #589805] |
Wed, 12 September 2012 14:41 |
|
Hello!
I am trying also to execute my MOFScript from a java program. I have a different exception, and I didnt find anything about it (at the end is the stack trace).
I am trying with the example TestAPI.java, but I needed to adjust it here:
public ExecuteMofScript () {
lePackage = UMLPackage.eINSTANCE;
parserUtil = new ParserUtil();
execMgr = ExecutionManager.getExecutionManager();
}
because in the example it is an error, because the private attributes were redefined in the constructor.
I am trying with a foo mofscript, very simple, in order to simplify the test.
It seems like I am missing a library, but I've added all the required to compile as indicated.
The exception is thrown in this line: execMgr.executeTransformation();
calling a method of ExecutionManager.
BTW: when is the mofscript passed to this class? with the "parse" function?
thank you so much!!
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/mofscript/fileresourcemodel/frm/FrmFactory
at org.eclipse.mofscript.runtime.MofScriptExecuterFactory.createExecutionEnvironment(MofScriptExecuterFactory.java:223)
at org.eclipse.mofscript.runtime.ExecutionManager.executeTransformation(ExecutionManager.java:1082)
at mofScriptExecution.ExecuteMofScript.execute(ExecuteMofScript.java:98)
at mofScriptExecution.ExecuteMofScript.test(ExecuteMofScript.java:112)
at mofScriptExecution.ExecuteMofScript.main(ExecuteMofScript.java:131)
Caused by: java.lang.ClassNotFoundException: org.eclipse.mofscript.fileresourcemodel.frm.FrmFactory
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 5 more
|
|
|
|
Powered by
FUDForum. Page generated in 0.04025 seconds