Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » AM3 » [AM3] AM3-Injector "xml to ecore" doesn't work!
[AM3] AM3-Injector "xml to ecore" doesn't work! [message #542294] Thu, 24 June 2010 13:20 Go to next message
Alexey is currently offline AlexeyFriend
Messages: 61
Registered: January 2010
Member
Hello!

Here is my problem:

I have 2 files - one MM (metamodel) as xsd and its M (model) as xml. My purpose is to make ecore files from both MM and M.

1. MM.xsd to MM.ecore -> With EMF-genmodel extraction I could get MM.ecore from MM.xsd

2. M.xml to M.ecore.
This transformation didn't succeed.
I used for xml2ecore transformation the am3-injector (Eclipse 3.4.2+EMF2.4.0+ ATL.2.0 +AM3_0.2.0)
And As I tried the injection to ecore, I got these errors:

Fehler 1: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'XML' not found.
Fehler 2: org.eclipse.emf.ecore.xmi.ClassNotFoundException: Class 'Root' not found.


I also tried to inject some other xml-files always the same 2 errors (see above).



I read then in the ATL-forum that someone faced the same problem.
He solved it then, after installing the "OLD VERSION OF AM3" and after having used the AM3-Injector then.
Here is the link to the forum-entry: http://www.eclipse.org/forums/index.php?t=msg&th=32426&a mp;start=0&

So, I tried to install this "oldAM3" and found the link with howto:

http://wiki.eclipse.org/AM3/How_Install_AM3_From_SVN

So, I had to install Eclipse 3.42, then EMF2.4.0, then ATL 2.0 and then at last the old AM3 from sources as described in link "How Install AM3 From SVN".

3.4.2+EMF2.4.0 (core) was ok.

But then I started to look for ATL2.0 and found ONLY ATL2.0 TOGETHER WITH AM3:
http://www.eclipse.org/downloads/download.php?file=/modeling /m2m/atl/bundle/ATL_Bundle_2.0.0RC2_Windows.zip

No ATL2.0 WITHOUT AM3 was found! And the AM3-version going together with ATL 2.0 is (I suppose) the NEW one, not the OLD one, which (the old one) I need to perform the injection right.


Questions:

1. Where can I find the ATL 2.0 PURE, without AM3?
2. Is there any other possibility to solve the problem with AM3 - xml2ecore - injection-Errors?



Thanks a lot
Alexey

Re: [AM3] AM3-Injector "xml to ecore" doesn't work! [message #542360 is a reply to message #542294] Thu, 24 June 2010 15:33 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hi Alexey,

You can find from http://docatlanmod.emn.fr/Eclipse_Bundles/AMMA_Prototype/AMM APrototypeEclipse.zip a bundle including compatible versions of ATL2.x and AM3.
I just re-tested it and the XML injection is properly working.

Best regards,

Hugo


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: [AM3] AM3-Injector "xml to ecore" doesn't work! [message #542555 is a reply to message #542360] Fri, 25 June 2010 10:31 Go to previous messageGo to next message
Alexey is currently offline AlexeyFriend
Messages: 61
Registered: January 2010
Member
Hello, Hugo!

I installed Eclipse from the link you gave me.

It still doesnt work.

What did I do:

1. Download and install "AMMA-Prototype"
2. Started a new ATL-project
3. Imported the Model.xml file in this project
4. Switched to AM3-perspective
5. Right-clicked on the file Model.xml
6. Pressed option "inject to ecore"

As I tried then to open Model.Ecore - it has shown me the same errors as before:


Error 1: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'XML' not found.
Error 2: org.eclipse.emf.ecore.xmi.ClassNotFoundException: Class 'Root' not found.





I guess, I make something wrong, because You said, it should work.

Thank you for your help.

Alexey
Re: [AM3] AM3-Injector "xml to ecore" doesn't work! [message #542602 is a reply to message #542555] Fri, 25 June 2010 12:10 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hi Alexey,

Now I understand better the error.
You're trying to open a model (with the standard XMI Reflective Editor) whose metamodel has not been registered in the EMF registry. As a consequence, the Editor cannot open it and simply displays the error you mentioned.

Before opening it, you need to register (in the EMF registry of Eclipse) the XML metamodel this generated model conforms to. For doing so, you have to right-clik on it and select the "Register metamodel" action.
I will send you by email this XML metamodel in Ecore.

Best regards,

Hugo


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: [AM3] AM3-Injector "xml to ecore" doesn't work! [message #542610 is a reply to message #542602] Fri, 25 June 2010 12:35 Go to previous messageGo to next message
Alexey is currently offline AlexeyFriend
Messages: 61
Registered: January 2010
Member
Hello, Hugo!


Now the

reqif1.0alpha_example_specification-XML.xml

to

reqif1.0alpha_example_specification-XML.ecore

works. (but If I inject the reqif1.0alpha_example_specification-XML.xml to MOF- xmi, it still doesnt work, but I can live with that, because I hope, ecore will be enough for ATL-transformations).

If I got you right, I have now to import in folder "Metamodels" - the reqif.ecore - Metamodel, I obtained due to xsd2ecore genmodel-extraction, right?

Thanks a lot for your help,
Alexey
Re: [AM3] AM3-Injector "xml to ecore" doesn't work! [message #580029 is a reply to message #542360] Fri, 25 June 2010 10:32 Go to previous messageGo to next message
Alexey is currently offline AlexeyFriend
Messages: 61
Registered: January 2010
Member
Hello, Hugo!

I installed Eclipse from the link you gave me.

It still doesnt work.

What did I do:

1. Download and install "AMMA-Prototype"
2. Started a new ATL-project
3. Imported the Model.xml file in this project
4. Switched to AM3-perspective
5. Right-clicked on the file Model.xml
6. Pressed option "inject to ecore"

As I tried then to open Model.Ecore - it has shown me the same errors as before:


Error 1: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'XML' not found.
Error 2: org.eclipse.emf.ecore.xmi.ClassNotFoundException: Class 'Root' not found.





I guess, I make something wrong, because You said, it should work.

Thank you for your help.

Alexey
Re: [AM3] AM3-Injector "xml to ecore" doesn't work! [message #580042 is a reply to message #580029] Fri, 25 June 2010 12:10 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hi Alexey,

Now I understand better the error.
You're trying to open a model (with the standard XMI Reflective Editor) whose metamodel has not been registered in the EMF registry. As a consequence, the Editor cannot open it and simply displays the error you mentioned.

Before opening it, you need to register (in the EMF registry of Eclipse) the XML metamodel this generated model conforms to. For doing so, you have to right-clik on it and select the "Register metamodel" action.
I will send you by email this XML metamodel in Ecore.

Best regards,

Hugo
--
--------------------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (INRIA & EMN)
Ecole des Mines de Nantes
Nantes - France
---------------------------------------------------------


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: [AM3] AM3-Injector "xml to ecore" doesn't work! [message #580053 is a reply to message #580042] Fri, 25 June 2010 12:35 Go to previous messageGo to next message
Alexey is currently offline AlexeyFriend
Messages: 61
Registered: January 2010
Member
Hello, Hugo!


Now the

reqif1.0alpha_example_specification-XML.xml

to

reqif1.0alpha_example_specification-XML.ecore

works. (but If I inject the reqif1.0alpha_example_specification-XML.xml to MOF- xmi, it still doesnt work, but I can live with that, because I hope, ecore will be enough for ATL-transformations).

If I got you right, I have now to import in folder "Metamodels" - the reqif.ecore - Metamodel, I obtained due to xsd2ecore genmodel-extraction, right?

Thanks a lot for your help,
Alexey
Re: [AM3] AM3-Injector "xml to ecore" doesn't work! [message #632518 is a reply to message #542602] Wed, 13 October 2010 09:54 Go to previous messageGo to next message
Arun  is currently offline Arun Friend
Messages: 16
Registered: October 2010
Junior Member
Hugo Bruneliere wrote on Fri, 25 June 2010 08:10
Hi Alexey,

Now I understand better the error.
You're trying to open a model (with the standard XMI Reflective Editor) whose metamodel has not been registered in the EMF registry. As a consequence, the Editor cannot open it and simply displays the error you mentioned.

Before opening it, you need to register (in the EMF registry of Eclipse) the XML metamodel this generated model conforms to. For doing so, you have to right-clik on it and select the "Register metamodel" action.
I will send you by email this XML metamodel in Ecore.

Best regards,

Hugo



Hi Hugo!!

Could you kindly also mail me the XML metamodel in ecore.

regards
arun
Re: [AM3] AM3-Injector "xml to ecore" doesn't work! [message #637692 is a reply to message #542294] Mon, 08 November 2010 11:19 Go to previous messageGo to next message
Gorka Puente is currently offline Gorka PuenteFriend
Messages: 2
Registered: November 2010
Junior Member
Hi Bruno,
I downloaded the bundle, followed all the steps (I also registered the metamodel) and I still get the same errors

org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'XML' not found.
org.eclipse.emf.ecore.xmi.ClassNotFoundException: Class 'Root' not found.

Could you point me any hint to follow on it?
Thank you in advance,
Gorka
Re: [AM3] AM3-Injector "xml to ecore" doesn't work! [message #685993 is a reply to message #637692] Tue, 21 June 2011 10:14 Go to previous messageGo to next message
Emwedish Endargachew is currently offline Emwedish EndargachewFriend
Messages: 27
Registered: April 2011
Junior Member
Hi Gorka,
I think it has been a long since you posted this, would you please be kind and send me the solution you come across. I am facing same problem. I even posted it as new post, cause i did not see this before.

I really appreciate your fast reply,
thanks in advance,
emwedish
Re: [AM3] AM3-Injector "xml to ecore" doesn't work! [message #686115 is a reply to message #685993] Tue, 21 June 2011 18:56 Go to previous message
Gorka Puente is currently offline Gorka PuenteFriend
Messages: 2
Registered: November 2010
Junior Member
Sorry Emwedish but I didn't find a solution. I was testing it and I just gave up. If you find any solution please post it here.
Best regards,
Gorka
Previous Topic:[AM3] AM3 perspective in Eclipse Helios
Next Topic:Newbie: Can't install AM3
Goto Forum:
  


Current Time: Fri Mar 29 14:15:12 GMT 2024

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

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

Back to the top