| [AM3] AM3-Injector "xml to ecore" doesn't work! [message #542294] |
Thu, 24 June 2010 09:20  |
Alexey 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 #542602 is a reply to message #542555] |
Fri, 25 June 2010 08:10   |
Hugo Bruneliere Messages: 560 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 & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
|
|
|
| Re: [AM3] AM3-Injector "xml to ecore" doesn't work! [message #542610 is a reply to message #542602] |
Fri, 25 June 2010 08:35   |
Alexey 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 #580042 is a reply to message #580029] |
Fri, 25 June 2010 08:10   |
Hugo Bruneliere Messages: 560 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 - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
|
|
|
| Re: [AM3] AM3-Injector "xml to ecore" doesn't work! [message #580053 is a reply to message #580042] |
Fri, 25 June 2010 08:35   |
Alexey 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
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 3.26495 seconds