Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » How to fix a "Package with uri not found." error
How to fix a "Package with uri not found." error [message #692588] Mon, 04 July 2011 19:43 Go to next message
Benson  is currently offline Benson Friend
Messages: 4
Registered: July 2011
Junior Member
Build Identifier: 20090619-0625

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);


Resource resource = resourceFact.createResource(coreXMI);
try {

resource.load(new FileInputStream(XMIFile), Collections.EMPTY_MAP);

} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}


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.

[Updated on: Mon, 04 July 2011 20:34]

Report message to a moderator

Re: How to fix a "Package with uri not found." error [message #692976 is a reply to message #692588] Tue, 05 July 2011 15:04 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
It this happening in your own code or in one of the UML tools? In any
case, it's really a question for the UML2 newsgroup whether that version
is supported.

> Build Identifier: 20090619-0625
>
> The following code provides me with the following error,
> "Package with uri 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:
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Control/Uncontrol in Eclipse EMF
Next Topic:Re: EmfFacet
Goto Forum:
  


Current Time: Fri Apr 26 21:03:35 GMT 2024

Powered by FUDForum. Page generated in 0.02329 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top