call transformation from Java API [message #520163] |
Thu, 11 March 2010 07:16  |
Eclipse User |
|
|
|
Hello,
I tried running the TestAPI.java found in the user guide.
The execution is suspended at the line: Resource resource = rSet.getResource(uri, true);
throwing the following exceptions:
-----------------
Exception in thread "main" org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://www.eclipse.org/uml2/2.1.0/UML' not found. (file:/home/yeliu/workspace/MOFScriptApp/Architectural_Descr iption.uml, 2, 177)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:315)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:274)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:397)
at TestAPI.execute(TestAPI.java:65)
at TestAPI.test(TestAPI.java:98)
at TestAPI.main(TestAPI.java:120)
Caused by: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://www.eclipse.org/uml2/2.1.0/UML' not found. (file:/home/yeliu/workspace/MOFScriptApp/Architectural_Descr iption.uml, 2, 177)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.getPackageForURI(X MLHandler.java:2590)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.getFactoryForPrefi x(XMLHandler.java:2421)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType (XMLHandler.java:1299)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XM LHandler.java:1468)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:1019)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMI Handler.java:83)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:1001)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:712)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHa ndler.java:169)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .startElement(AbstractSAXParser.java:501)
at
--------------------
I inserted a print statement right after :
URI uri = URI.createFileURI(sourceModelFile.getAbsolutePath());
and get the following URI printed.
file:/home/yeliu/workspace/MOFScriptApp/Architectural_Descri ption.uml
The input model of the transformation is :http://www.eclipse.org/uml2/3.0.0/UML.
Any one can help with this ?
Thanks a lot!
M
|
|
|
|
|
|
|
Re: call transformation from Java API [message #589813 is a reply to message #520502] |
Mon, 15 March 2010 05:06  |
Eclipse User |
|
|
|
Hello,
The UML related library(uml2.common, uml2.uml) I added in the path are:
-----------------
UML_CP=$EH/org.eclipse.uml2.common_1.5.0.v200905041045.jar:$ EH/org.eclipse.uml2.uml_3.0.1.v200908281330.jar
-----------------
these are available ones I can find on my computer, I wanted to attach these files, but couldn't find the specific attachment button in this forum.
Is any other way to send them to you?
M
|
|
|
Powered by
FUDForum. Page generated in 0.24889 seconds