Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MOFScript » call transformation from Java API
call transformation from Java API [message #589779] Thu, 11 March 2010 07:16 Go to previous message
yeliu is currently offline yeliu
Messages: 145
Registered: July 2009
Senior Member
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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:Setting 'type' on uml.Property
Next Topic:[Help] Problem with MOFscript installation
Goto Forum:
  


Current Time: Fri May 24 08:11:09 EDT 2013

Powered by FUDForum. Page generated in 0.01767 seconds