Home » Modeling » EMF » Package with uri not found ?
Package with uri not found ? [message #406808] |
Fri, 02 February 2007 07:22  |
Eclipse User |
|
|
|
Hi all,
I'm trying to create a plugin, in which I have two more or less separate EMF
models.
the first is located in the package nl.company.egen.model, and the second in
the package nl.company.egen.modeldef.
I have two separate ecore files in my model folder, located in the project's
root.
I have created a view, which opens the second (modeldef) model, and displays
it in a treeview. However, sometimes the error
Unable to create view: org.eclipse.emf.ecore.xmi.PackageNotFoundException:
Package with uri 'http:///nl/company/egen/modeldef.ecore' not found.
is thrown on opening the view.
I do have both ecore files (model.ecore and modeldef.ecore) included in the
build / manifest (both in the binary and in the source)
Also all nl.company.modeldef.* (generated) packages are exported.
Here's the contents of the emf modeldef file I'm trying to show in the view.
<?xml version="1.0" encoding="UTF-8"?>
<nl.company.egen.modeldef:DefDefinition xmi:version="2.0"
xmlns:xmi=http://www.omg.org/XMI
xmlns:nl.company.egen.modeldef="http:///nl/company/egen/modeldef.ecore"/>
btw, I'm still using emf 2.2.0 v200605231736. I guess I should update one of
these days, but I'd like to get this working before introducing possible
other uncertainties.
Does somebody knows what is causing this exception ? (And how I can avoid
it?)
TIA
Ronald
|
|
|
Re: Package with uri not found ? [message #406809 is a reply to message #406808] |
Fri, 02 February 2007 07:29   |
Eclipse User |
|
|
|
One addition; It works when I delete the file and create it again (with the
emf generated new model wizard).
After that, I can open the view.
But on closing my secondary eclipse instance and reopen it again from the
primary eclipse instance,
it fails again. Do I have to register the model somewhere before it
recognises the model ?
Ronald
"Ronald" <rvraaphorst@hotmail.com> schreef in bericht
news:epvadt$qk2$1@utils.eclipse.org...
> Hi all,
>
> I'm trying to create a plugin, in which I have two more or less separate
> EMF models.
> the first is located in the package nl.company.egen.model, and the second
> in the package nl.company.egen.modeldef.
> I have two separate ecore files in my model folder, located in the
> project's root.
>
> I have created a view, which opens the second (modeldef) model, and
> displays it in a treeview. However, sometimes the error
>
> Unable to create view: org.eclipse.emf.ecore.xmi.PackageNotFoundException:
> Package with uri 'http:///nl/company/egen/modeldef.ecore' not found.
>
> is thrown on opening the view.
> I do have both ecore files (model.ecore and modeldef.ecore) included in
> the build / manifest (both in the binary and in the source)
> Also all nl.company.modeldef.* (generated) packages are exported.
>
> Here's the contents of the emf modeldef file I'm trying to show in the
> view.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <nl.company.egen.modeldef:DefDefinition xmi:version="2.0"
> xmlns:xmi=http://www.omg.org/XMI
> xmlns:nl.company.egen.modeldef="http:///nl/company/egen/modeldef.ecore"/>
>
> btw, I'm still using emf 2.2.0 v200605231736. I guess I should update one
> of
> these days, but I'd like to get this working before introducing possible
> other uncertainties.
>
> Does somebody knows what is causing this exception ? (And how I can avoid
> it?)
>
> TIA
> Ronald
>
|
|
|
Re: Package with uri not found ? [message #406812 is a reply to message #406809] |
Fri, 02 February 2007 07:58   |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
--------------050909020300080304030205
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Ronald,
Generated models are registered like this in the plugin.xml
<extension point="org.eclipse.emf.ecore.generated_package">
<package
uri = "http://www.example.com/Library"
class = "com.example.library.LibraryPackage"
genModel = "model/Library.genmodel" />
</extension>
and this ensures there is a registration for them in
EPackage.Registry.INSTANCE. Is that missing for your plugins?
Ronald wrote:
> One addition; It works when I delete the file and create it again (with the
> emf generated new model wizard).
> After that, I can open the view.
>
> But on closing my secondary eclipse instance and reopen it again from the
> primary eclipse instance,
> it fails again. Do I have to register the model somewhere before it
> recognises the model ?
>
> Ronald
>
> "Ronald" <rvraaphorst@hotmail.com> schreef in bericht
> news:epvadt$qk2$1@utils.eclipse.org...
>
>> Hi all,
>>
>> I'm trying to create a plugin, in which I have two more or less separate
>> EMF models.
>> the first is located in the package nl.company.egen.model, and the second
>> in the package nl.company.egen.modeldef.
>> I have two separate ecore files in my model folder, located in the
>> project's root.
>>
>> I have created a view, which opens the second (modeldef) model, and
>> displays it in a treeview. However, sometimes the error
>>
>> Unable to create view: org.eclipse.emf.ecore.xmi.PackageNotFoundException:
>> Package with uri 'http:///nl/company/egen/modeldef.ecore' not found.
>>
>> is thrown on opening the view.
>> I do have both ecore files (model.ecore and modeldef.ecore) included in
>> the build / manifest (both in the binary and in the source)
>> Also all nl.company.modeldef.* (generated) packages are exported.
>>
>> Here's the contents of the emf modeldef file I'm trying to show in the
>> view.
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <nl.company.egen.modeldef:DefDefinition xmi:version="2.0"
>> xmlns:xmi=http://www.omg.org/XMI
>> xmlns:nl.company.egen.modeldef="http:///nl/company/egen/modeldef.ecore"/>
>>
>> btw, I'm still using emf 2.2.0 v200605231736. I guess I should update one
>> of
>> these days, but I'd like to get this working before introducing possible
>> other uncertainties.
>>
>> Does somebody knows what is causing this exception ? (And how I can avoid
>> it?)
>>
>> TIA
>> Ronald
>>
>>
>
>
>
--------------050909020300080304030205
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Ronald,<br>
<br>
Generated models are registered like this in the plugin.xml<br>
<br>
<extension point="org.eclipse.emf.ecore.generated_package"><br >
<package <br>
uri = <a class="moz-txt-link-rfc2396E" href="http://www.example.com/Library">"http://www.example.com/Library"</a> <br>
class = "com.example.library.LibraryPackage"<br>
genModel = "model/Library.genmodel" /> <br>
</extension><br>
<br>
and this ensures there is a registration for them in
EPackage.Registry.INSTANCE. Is that missing for your plugins?<br>
<br>
<br>
Ronald wrote:
<blockquote cite="midepvaqp$rf3$1@utils.eclipse.org" type="cite">
<pre wrap="">One addition; It works when I delete the file and create it again (with the
emf generated new model wizard).
After that, I can open the view.
But on closing my secondary eclipse instance and reopen it again from the
primary eclipse instance,
it fails again. Do I have to register the model somewhere before it
recognises the model ?
Ronald
"Ronald" <a class="moz-txt-link-rfc2396E" href="mailto:rvraaphorst@hotmail.com"><rvraaphorst@hotmail.com></a> schreef in bericht
<a class="moz-txt-link-freetext" href="news:epvadt$qk2$1@utils.eclipse.org">news:epvadt$qk2$1@utils.eclipse.org</a>...
</pre>
<blockquote type="cite">
<pre wrap="">Hi all,
I'm trying to create a plugin, in which I have two more or less separate
EMF models.
the first is located in the package nl.company.egen.model, and the second
in the package nl.company.egen.modeldef.
I have two separate ecore files in my model folder, located in the
project's root.
I have created a view, which opens the second (modeldef) model, and
displays it in a treeview. However, sometimes the error
Unable to create view: org.eclipse.emf.ecore.xmi.PackageNotFoundException:
Package with uri '<a class="moz-txt-link-freetext" href="http:///nl/company/egen/modeldef.ecore">http:///nl/company/egen/modeldef.ecore</a>' not found.
is thrown on opening the view.
I do have both ecore files (model.ecore and modeldef.ecore) included in
the build / manifest (both in the binary and in the source)
Also all nl.company.modeldef.* (generated) packages are exported.
Here's the contents of the emf modeldef file I'm trying to show in the
view.
<?xml version="1.0" encoding="UTF-8"?>
<nl.company.egen.modeldef:DefDefinition xmi:version="2.0"
xmlns:xmi=<a class="moz-txt-link-freetext" href="http://www.omg.org/XMI">http://www.omg.org/XMI</a>
xmlns:nl.company.egen.modeldef=<a class="moz-txt-link-rfc2396E" href="http:///nl/company/egen/modeldef.ecore">"http:///nl/company/egen/modeldef.ecore"</a>/>
btw, I'm still using emf 2.2.0 v200605231736. I guess I should update one
of
these days, but I'd like to get this working before introducing possible
other uncertainties.
Does somebody knows what is causing this exception ? (And how I can avoid
it?)
TIA
Ronald
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
<br>
</body>
</html>
--------------050909020300080304030205--
|
|
| | | |
Re: Package with uri not found ? [message #406818 is a reply to message #406816] |
Fri, 02 February 2007 10:59  |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_0030_01C746EB.6F8F0010
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Wow, sorry I missed the obvious, but thanks for pointing that out.
I guess I was just buried too deep in all the details to take a step =
back, relax, and get the overview.
Ronald
------=_NextPart_000_0030_01C746EB.6F8F0010
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type =
content=3Dtext/html;charset=3DISO-8859-1>
<META content=3D"MSHTML 6.00.2900.3020" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY text=3D#000000 bgColor=3D#ffffff>
<DIV>Wow, sorry I missed the obvious, but thanks for pointing that =
out.</DIV>
<DIV>I guess I was just buried too deep in all the details to take a =
step back,=20
relax, and get the overview.</DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Ronald</FONT></DIV></BODY></HTML>
------=_NextPart_000_0030_01C746EB.6F8F0010--
|
|
|
Goto Forum:
Current Time: Thu Sep 25 22:23:07 EDT 2025
Powered by FUDForum. Page generated in 0.13413 seconds
|