Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Package with URI was not found in ATL plugin
Package with URI was not found in ATL plugin [message #923162] Tue, 25 September 2012 16:54 Go to next message
Fernanda R.F. is currently offline Fernanda R.F.Friend
Messages: 64
Registered: May 2012
Member
Hi,

I'm trying to convert a magic draw uml model with ATL plugin using as metamodel another uml file generated by magic draw, however I'm getting the following error:

org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://www.eclipse.org/uml2/2.0.0/UML' not found.


The same metamodel works when I'm running it in ATL, however when I'm trying to use ATL plugin I'm getting this error. I already imported uml2/2.0.0 jar file, but the error is still appearing.

What could be wrong?
Re: Package with URI was not found in ATL plugin [message #923252 is a reply to message #923162] Tue, 25 September 2012 19:03 Go to previous messageGo to next message
lili Mising name is currently offline lili Mising nameFriend
Messages: 8
Registered: July 2011
Junior Member
I think you have to register the package ...someting like this

EPackage.Registry.INSTANCE.put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);                EPackage.Registry.INSTANCE.put("'http://www.eclipse.org/uml2/2.0.0/UML",UMLPackage.eINSTANCE);
Re: Package with URI was not found in ATL plugin [message #923743 is a reply to message #923162] Wed, 26 September 2012 06:44 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

If you're using Juno then this is could well be
https://bugs.eclipse.org/bugs/show_bug.cgi?id=389542.

Regards

Ed Willink


On 25/09/2012 17:54, Fernanda R.F. wrote:
> Hi,
>
> I'm trying to convert a magic draw uml model with ATL plugin using as
> metamodel another uml file generated by magic draw, however I'm
> getting the following error:
>
> org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri
> 'http://www.eclipse.org/uml2/2.0.0/UML' not found.
>
>
> The same metamodel works when I'm running it in ATL, however when I'm
> trying to use ATL plugin I'm getting this error. I already imported
> uml2/2.0.0 jar file, but the error is still appearing.
>
> What could be wrong?
Re: Package with URI was not found in ATL plugin [message #925340 is a reply to message #923743] Thu, 27 September 2012 16:21 Go to previous messageGo to next message
Fernanda R.F. is currently offline Fernanda R.F.Friend
Messages: 64
Registered: May 2012
Member

Thanks for answers.
I 'll see what I could do about this problem.
Re: Package with URI was not found in ATL plugin [message #926281 is a reply to message #925340] Fri, 28 September 2012 13:39 Go to previous messageGo to next message
Fernanda R.F. is currently offline Fernanda R.F.Friend
Messages: 64
Registered: May 2012
Member
Hi,

I put the code as lili Mising name suggested, however I'm getting this error now:

org/eclipse/uml2/common/util/CacheAdapter

Some suggestion?
Re: Package with URI was not found in ATL plugin [message #926439 is a reply to message #926281] Fri, 28 September 2012 16:57 Go to previous messageGo to next message
Fernanda R.F. is currently offline Fernanda R.F.Friend
Messages: 64
Registered: May 2012
Member
Updating...

I inserted a new library (org.eclipse.uml2.common.util.*;) and now I'm getting a different problem:

org.eclipse.m2m.atl.core.ATLCoreException: Error loading metamodelos/UML_Standard_Profile.UML_Standard_Profile.profile.uml: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'UML Standard Profile' is not legal.

This value is as "name = UML Standard Profile" in UML file.

What could I do to solve it?
Re: Package with URI was not found in ATL plugin [message #929436 is a reply to message #926439] Mon, 01 October 2012 13:05 Go to previous messageGo to next message
Fernanda R.F. is currently offline Fernanda R.F.Friend
Messages: 64
Registered: May 2012
Member
Hi,

I created again the plugin and registered the UML path : http://www.eclipse.org/uml2/2.0.0/UML
And now I'm getting this error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/uml2/types/TypesPackage
	at org.eclipse.uml2.uml.internal.impl.UMLPackageImpl.init(UMLPackageImpl.java:1900)
	at org.eclipse.uml2.uml.UMLPackage.<clinit>(UMLPackage.java:82)



I'm using 2 metamodels, where one is an ecore file and other is an UML file (generated by Magic Draw - UML Standard Profile.uml

What could I do?
Re: Package with URI was not found in ATL plugin [message #929523 is a reply to message #929436] Mon, 01 October 2012 14:35 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

a) Wait for a fix to https://bugs.eclipse.org/bugs/show_bug.cgi?id=389542

b) Open all relevant UML files, mosted nested first, with the UML Model
Editor do a dummy edit and save so that the format is converted

c) revert to MDT/UML2 3.x

Regards

Ed Willink


On 01/10/2012 15:05, Fernanda R.F. wrote:
> Hi,
>
> I created again the plugin and registered the UML path :
> http://www.eclipse.org/uml2/2.0.0/UML
> And now I'm getting this error:
>
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/eclipse/uml2/types/TypesPackage
> at
> org.eclipse.uml2.uml.internal.impl.UMLPackageImpl.init(UMLPackageImpl.java:1900)
> at org.eclipse.uml2.uml.UMLPackage.<clinit>(UMLPackage.java:82)
>
>
>
> I'm using 2 metamodels, where one is an ecore file and other is an UML
> file (generated by Magic Draw - UML Standard Profile.uml
>
> What could I do?
Re: Package with URI was not found in ATL plugin [message #929564 is a reply to message #929523] Mon, 01 October 2012 15:12 Go to previous messageGo to next message
Fernanda R.F. is currently offline Fernanda R.F.Friend
Messages: 64
Registered: May 2012
Member
Thanks Ed Willink.
The problem is that I need to delivery it in the end of this month, it's my graduation work. I'll wait for the fix and try to created models with UML 3 so.
Re: Package with URI was not found in ATL plugin [message #930698 is a reply to message #929564] Tue, 02 October 2012 14:51 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

https://bugs.eclipse.org/bugs/show_bug.cgi?id=389542#c19 should be a fix
for you.

It would be helpful to know that it is.

Regards

Ed Willink

On 01/10/2012 17:12, Fernanda R.F. wrote:
> Thanks Ed Willink.
> The problem is that I need to delivery it in the end of this month,
> it's my graduation work. I'll wait for the fix and try to created
> models with UML 3 so.
>
Re: Package with URI was not found in ATL plugin [message #930908 is a reply to message #930698] Tue, 02 October 2012 18:56 Go to previous messageGo to next message
Fernanda R.F. is currently offline Fernanda R.F.Friend
Messages: 64
Registered: May 2012
Member
Hi Ed,

I tried the code in that link, and I updated my eclipse juno, however I'm getting an error.

A put it in the code
EcoreResourceFactoryImpl resourceSet = null;	
resourceSet.createResource(URI.createFileURI("metamodels/UML.uml"));	


And I'm getting this now:

Exception in thread "main" java.lang.NullPointerException
	at org.eclipse.m2m.atl.uml.files.myClass.<init>(myClass.java:103)
	at org.eclipse.m2m.atl.uml.files.myClass.main(myClass.java:79)


Have you a suggestion about what I can do?
Re: Package with URI was not found in ATL plugin [message #931343 is a reply to message #930908] Wed, 03 October 2012 05:28 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

The change seems to have successfully fixed reading the nested profiles,
so we move on

In https://bugs.eclipse.org/bugs/show_bug.cgi?id=389542 later comments
identify a problem
creating *.uml, that will in due course work when you do

resourceSet.createResource(URI.createFileURI("metamodels/UML.uml"),
ContentHandler.UNSPECIFIED_CONTENT_TYPE);

Today you will need to use an explicit content type; perhaps

resourceSet.createResource(URI.createFileURI("metamodels/UML.uml"),
UMLResource.UML_4_0_0_CONTENT_TYPE_IDENTIFIER);

Regards

Ed Willink

On 02/10/2012 20:56, Fernanda R.F. wrote:
> Hi Ed,
>
> I tried the code in that link, and I updated my eclipse juno, however
> I'm getting an error.
>
> A put it in the code
>
> EcoreResourceFactoryImpl resourceSet = null;
> resourceSet.createResource(URI.createFileURI("metamodels/UML.uml"));
>
>
> And I'm getting this now:
>
>
> Exception in thread "main" java.lang.NullPointerException
> at org.eclipse.m2m.atl.uml.files.myClass.<init>(myClass.java:103)
> at org.eclipse.m2m.atl.uml.files.myClass.main(myClass.java:79)
>
>
> Have you a suggestion about what I can do?
>
Re: Package with URI was not found in ATL plugin [message #931758 is a reply to message #931343] Wed, 03 October 2012 13:45 Go to previous messageGo to next message
Fernanda R.F. is currently offline Fernanda R.F.Friend
Messages: 64
Registered: May 2012
Member
Hi Ed,

Thanks for your answer!

I'm trying to use the following code as suggested:

resourceSet.createResource(URI.createFileURI("metamodels/UML.uml"),
UMLResource.UML_4_0_0_CONTENT_TYPE_IDENTIFIER);

However, eclipse is asking me to remove this second part (UMLResource.UML_4....) because it is not compatible with "createResource" method, that uses just URI like : createResource (URI uri);

I don't know what to do to solve it.
Re: Package with URI was not found in ATL plugin [message #931860 is a reply to message #931758] Wed, 03 October 2012 15:36 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

The

Resource createResource(URI uri, String contentType)

is part of the ResourceSet API.

UMLResource.UML_4_0_0_CONTENT_TYPE_IDENTIFIER

is a String, so you must have a stupid Java typo.

Regards

Ed Willink

On 03/10/2012 15:45, Fernanda R.F. wrote:
> Hi Ed,
>
> Thanks for your answer!
>
> I'm trying to use the following code as suggested:
>
> resourceSet.createResource(URI.createFileURI("metamodels/UML.uml"),
> UMLResource.UML_4_0_0_CONTENT_TYPE_IDENTIFIER);
>
> However, eclipse is asking me to remove this second part
> (UMLResource.UML_4....) because it is not compatible with
> "createResource" method, that uses just URI like : createResource (URI
> uri);
>
> I don't know what to do to solve it.
Re: Package with URI was not found in ATL plugin [message #931889 is a reply to message #931860] Wed, 03 October 2012 16:14 Go to previous messageGo to next message
Fernanda R.F. is currently offline Fernanda R.F.Friend
Messages: 64
Registered: May 2012
Member
Thanks for your answer Ed, I'll find the error in my code.

[Updated on: Wed, 03 October 2012 16:22]

Report message to a moderator

Re: Package with URI was not found in ATL plugin [message #931905 is a reply to message #931889] Wed, 03 October 2012 16:33 Go to previous messageGo to next message
Fernanda R.F. is currently offline Fernanda R.F.Friend
Messages: 64
Registered: May 2012
Member
I found the problem, and now I'm getting a new (or not so new) problem.
When I try to run the project is returning it:

Exception in thread "main" java.lang.NullPointerException
at org.eclipse.m2m.atl.uml.files.Uml2metamodel.main(Uml2metamodel.java:85)

Suggestions?
Re: Package with URI was not found in ATL plugin [message #932026 is a reply to message #931905] Wed, 03 October 2012 19:08 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

I'm not an ATL developer or user; this now looks like an ATL issue;
quite possibly the same createResource issue.

Regards

Ed Willink

On 03/10/2012 18:33, Fernanda R.F. wrote:
> I found the problem, and now I'm getting a new (or not so new) problem.
> When I try to run the project is returning it:
>
> Exception in thread "main" java.lang.NullPointerException
> at
> org.eclipse.m2m.atl.uml.files.Uml2metamodel.main(Uml2metamodel.java:85)
>
> Suggestions?
Re: Package with URI was not found in ATL plugin [message #936373 is a reply to message #932026] Mon, 08 October 2012 00:35 Go to previous messageGo to next message
Fernanda R.F. is currently offline Fernanda R.F.Friend
Messages: 64
Registered: May 2012
Member
Hi,

I was testing it, and when I remove the code :
resourceSet.createResource(URI.createFileURI("metamodels/UML.uml"),
UMLResource.UML_4_0_0_CONTENT_TYPE_IDENTIFIER);

I stop getting the error: Exception in thread "main" java.lang.NullPointerException

and then I'm starting getting this error:
org.eclipse.m2m.atl.core.ATLCoreException: Error loading models/vvv.uml: org.eclipse.emf.ecore.xmi.ClassNotFoundException: Class 'Model' is not found or is abstract. (file:///C:/test/org.eclipse.m2m.atl.uml2metamodel/models/vvv.uml, 3, 75)
	at org.eclipse.m2m.atl.core.emf.EMFInjector.inject(EMFInjector.java:70)
	at org.eclipse.m2m.atl.core.emf.EMFInjector.inject(EMFInjector.java:84)
	at org.eclipse.m2m.atl.uml.files.Uml2metamodel.loadModels(Uml2metamodel.java:146)
	at org.eclipse.m2m.atl.uml.files.Uml2metamodel.main(Uml2metamodel.java:92)
Caused by: org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.ClassNotFoundException: Class 'Model' is not found or is abstract. (file:///C:/test/org.eclipse.m2m.atl.uml2metamodel/models/vvv.uml, 3, 75)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:278)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:406)
	at org.eclipse.m2m.atl.core.emf.EMFInjector.inject(EMFInjector.java:65)
	... 3 more


What could I do? I'm not expert in ATL lot less in Java... Sad
Re: Package with URI was not found in ATL plugin [message #936572 is a reply to message #936373] Mon, 08 October 2012 05:44 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Removing the line goes backwards so that you get a more fundamental error.

Depending exactly when you last synchronized with GIT will affect what
works.

The most recent change in MDT/UML2's GIT IMHO was a bad one.

Can you clarify exactly what MDT/UML2 release/branch/commit you are using?

Regards

Ed Willink

On 08/10/2012 01:35, Fernanda R.F. wrote:
> Hi,
>
> I was testing it, and when I remove the code :
> resourceSet.createResource(URI.createFileURI("metamodels/UML.uml"),
> UMLResource.UML_4_0_0_CONTENT_TYPE_IDENTIFIER);
>
> I stop getting the error: Exception in thread "main"
> java.lang.NullPointerException
>
> and then I'm starting getting this error:
> org.eclipse.m2m.atl.core.ATLCoreException: Error loading
> models/vvv.uml: org.eclipse.emf.ecore.xmi.ClassNotFoundException:
> Class 'Model' is not found or is abstract.
> (file:///C:/test/org.eclipse.m2m.atl.uml2metamodel/models/vvv.uml, 3, 75)
> at
> org.eclipse.m2m.atl.core.emf.EMFInjector.inject(EMFInjector.java:70)
> at
> org.eclipse.m2m.atl.core.emf.EMFInjector.inject(EMFInjector.java:84)
> at
> org.eclipse.m2m.atl.uml.files.Uml2metamodel.loadModels(Uml2metamodel.java:146)
> at
> org.eclipse.m2m.atl.uml.files.Uml2metamodel.main(Uml2metamodel.java:92)
> Caused by:
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException:
> org.eclipse.emf.ecore.xmi.ClassNotFoundException: Class 'Model' is not
> found or is abstract.
> (file:///C:/test/org.eclipse.m2m.atl.uml2metamodel/models/vvv.uml, 3, 75)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:278)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:406)
> at
> org.eclipse.m2m.atl.core.emf.EMFInjector.inject(EMFInjector.java:65)
> ... 3 more
>
>
> What could I do? I'm not expert in ATL lot less in Java... :(
>
Re: Package with URI was not found in ATL plugin [message #937893 is a reply to message #936572] Tue, 09 October 2012 10:58 Go to previous messageGo to next message
Fernanda R.F. is currently offline Fernanda R.F.Friend
Messages: 64
Registered: May 2012
Member
Sorry Ed, but how I see it? I'm not a developer... Sad
Re: Package with URI was not found in ATL plugin [message #937902 is a reply to message #937893] Tue, 09 October 2012 11:08 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Thanks for trying to help. Best to wait till we think we have a good fix
available.

Regards

Ed Willink

On 09/10/2012 11:58, Fernanda R.F. wrote:
> Sorry Ed, but how I see it? I'm not a developer... :(
>
Re: Package with URI was not found in ATL plugin [message #938051 is a reply to message #937902] Tue, 09 October 2012 14:00 Go to previous messageGo to next message
Fernanda R.F. is currently offline Fernanda R.F.Friend
Messages: 64
Registered: May 2012
Member
Right... thanks for your answer and help Ed.

I'll wait.
Re: Package with URI was not found in ATL plugin [message #956246 is a reply to message #938051] Wed, 24 October 2012 10:55 Go to previous messageGo to next message
Fernanda R.F. is currently offline Fernanda R.F.Friend
Messages: 64
Registered: May 2012
Member
Hi,
I'd know if there is a fix to that bug, or if there is a possible data to solve it?
I really need this fix to finish my work.

Thanks
Re: Package with URI was not found in ATL plugin [message #1023123 is a reply to message #923162] Sat, 23 March 2013 10:08 Go to previous message
Mathias Colpaert is currently offline Mathias ColpaertFriend
Messages: 13
Registered: November 2012
Junior Member
I have posted a similar question in a new topic here.
Previous Topic:Elements of xmi files to the graphics
Next Topic:multiple output models conform to the same metamodel?
Goto Forum:
  


Current Time: Thu Apr 18 02:50:38 GMT 2024

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

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

Back to the top