Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsHow to fix a "Package with uri not found." error
https://www.eclipse.org/forums/index.php/mv/msg/218678/693542/#msg_693542
The following code provides me with the following error,
"Package with uri htt..//schema.omg.org/spec/UML/2.1.1 not found.".
I was hoping someone could possibly explain to me what is happening. Within
the contents of the project.xmi file it contains that uri and this file was
exported from Rhapsody. This .xmi file is a model diagram. I found out that
EMF allows an interpretation of this model as a UML and in turn I was hoping I
could traverse that UML interpretation rather than the .xmi text. My ultimate
goal is to recreate that Rhapsody model in Eclipse.
Here is the beginning of the stack trace:
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package with uri htt..//schema.omg.org/spec/UML/2.1.1 not found. (file:/C:/project.xmi, 3, 80)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:83)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:191)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:180)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1494)
(the htt..// is a weblink)
Code:
String pathToXMI = "C:\\project.xmi";
File XMIFile = new File(pathToXMI);
URI coreXMI = URI.createFileURI(pathToXMI);
I believe I have to register the package but I'm not exactly sure how to... any form of assistance would be greatly appreciated.
Thanks.]]>Benson 2011-07-06T17:50:52-00:00Re: How to fix a "Package with uri not found." error
https://www.eclipse.org/forums/index.php/mv/msg/218678/881360/#msg_881360
I just encountered the same error, then it came to my mind that i haven't initialized my generated package.
It can be done easily through: