Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Solved: Package with uri 'http://xyz.de/1.0' not found(A not empty diagram won't open after restarting the RCP Application)
Solved: Package with uri 'http://xyz.de/1.0' not found [message #777060] Mon, 09 January 2012 18:54 Go to next message
Bjoern Ickx is currently offline Bjoern IckxFriend
Messages: 17
Registered: June 2011
Junior Member
Hey together,

I have yet a very simple model. Process, Connector and Flow.

When I create a Diagram and add e.g. one element to the diagram and save it, it will reopen nicely if I don't restart the whole RCP application.

But when I restart the whole application and try to open a diagram with more than zero elements I'll get a Package not found exception:
org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://foo.de/1.0' not found.

And a Null Pointer Exception at
org.eclipse.graphiti.ui.internal.editor.DiagramEditorInternal.dispose(DiagramEditorInternal.java:552)


I created the EMF model and the corresponding code within eclipse via a diagram editor and created the code with the help of the automatically created ".genmodel".

Does anyone have any suggestions? If yes, please keep in mind that I am still quite lost in the giant world of EMF, GEF, Graphiti, Eclipse RCP (even after 6 months of sporadically programming this graphiti tool and quite good knowledge in java programming)

Thanks for your help!

Best Bjoern






[Updated on: Tue, 10 January 2012 14:39]

Report message to a moderator

Re: Package with uri 'http://xyz.de/1.0' not found [message #777380 is a reply to message #777060] Tue, 10 January 2012 11:20 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1635
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Not sure, but this sounds as if the EMF model (its package) is not correctly
registered in your plugin.xml...

Michael
Re: Package with uri 'http://xyz.de/1.0' not found [message #777450 is a reply to message #777380] Tue, 10 January 2012 14:37 Go to previous messageGo to next message
Bjoern Ickx is currently offline Bjoern IckxFriend
Messages: 17
Registered: June 2011
Junior Member
Solved it:
If anyone is interested: Check out the EMF Faq: http://wiki.eclipse.org/EMF/FAQ#I_get_a_PackageNotFoundException:_e.g..2C_.22Package_with_uri_.27http:.2F.2Fcom.example.company.ecore.27_not_found..22_What_do_I_need_to_do.3F

In my case I named the generated EMF model simply "model". EMF generated 3 packages: "eModel.Model", "eModel.model.impl" and "eModel.model.util".

These packages were not registered during runtime by just opening a diagram, but were registered somehow when creating a new diagram. When I tried to open my already existing diagram after a fresh start, the package couldn't be found and an exception was thrown.
To register the packages during runtime I simply had to call:
ModelPackage mp = ModelPackage.eINSTANCE;


"ModelPackage" is a class generated by EMF and in my case can be found in "eModel.Model"

Best Björn

Re: Package with uri 'http://xyz.de/1.0' not found [message #1021655 is a reply to message #777450] Wed, 20 March 2013 13:13 Go to previous message
Mario Cortes is currently offline Mario CortesFriend
Messages: 3
Registered: March 2013
Junior Member
I had the same problem when developing an Eclipse Plugin.

I resolved adding an extension to my plugin.xml file:

<extension point="org.eclipse.emf.ecore.generated_package">
<package uri="NS Uri of Ecore model"
class="uri.NameOfModelPackage"
genModel="genmodel path"/>
</extension>

An example could be:

<extension point="org.eclipse.emf.ecore.generated_package">
<package uri="http://eclipse.org/graphiti/mm/examples/library"
class="org.eclipse.graphiti.examples.library.LibraryPackage"
genModel="model/Library.genmodel"/>
</extension>
Previous Topic:Undo in a MultiPageEditor environment
Next Topic:Beginner Question
Goto Forum:
  


Current Time: Mon Nov 24 12:29:39 GMT 2014

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

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