Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [EMF] Loading UML Magicdraw models
[EMF] Loading UML Magicdraw models [message #423840] Tue, 07 October 2008 19:24 Go to next message
neto Mising name is currently offline neto Mising nameFriend
Messages: 33
Registered: July 2009
Member
Hi,

I need load UML models exported from MagicDraw. To load these models i
configure UML environment as said in the section Programmatic Migration in
the article:

http://www.eclipse.org/modeling/mdt/uml2/docs/guides/UML2_2. 0_Migration_Guide/guide.html

Well, but when a run my program these exception is throwed:

rs.emf4atl.ASMEMFModel.loadASMEMFModel(ASMEMFModel.java:365)
at
org.eclipse.m2m.atl.engine.AtlEMFModelHandler.loadModel(AtlE MFModelHandler.java:222)
at
br.edu.gmf.udt.m2m.atl.ATLExecutor.createASMMetamodel(ATLExe cutor.java:235)
at br.edu.gmf.udt.m2m.atl.ATLExecutor.initInputModels(ATLExecut or.java:288)
at
br.edu.gmf.udt.m2m.atl.ATLExecutor.makeTransformation(ATLExe cutor.java:256)
at
br.edu.gmf.udt.m2m.atl.ATLExecutor.executeTransformations(AT LExecutor.java:335)
at br.edu.gmf.udt.AbsExecutor.generateTests(AbsExecutor.java:28 )
at br.edu.gmf.udt.UDTExecutor.main(UDTExecutor.java:53)
Caused by: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package
with uri 'http:///_zrN_0SUoEdmNXYQzyImvfA.profile.uml2' not found.
( file:///C:/Users/Netuh/Desktop/eclipse%20Place/workspace/UDT 2/IN, 18218,
99)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.getPackageForURI(X MLHandler.java:2566)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.getFactoryForPrefi x(XMLHandler.java:2398)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType (XMLHandler.java:1276)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XM LHandler.java:1445)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:1010)
at
org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMI Handler.java:87)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:992)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:712)
at
org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHa ndler.java:167)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .startElement(AbstractSAXParser.java:501)
at
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocume ntParser.emptyElement(AbstractXMLDocumentParser.java:179)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScanner Impl.scanStartElement(XMLNSDocumentScannerImpl.java:377)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDriver.next(XMLDocumentFragmentSca nnerImpl.java:2747)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.next(XMLDocumentScannerImpl.java:648)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScanner Impl.next(XMLNSDocumentScannerImpl.java:140)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java: 510)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:807)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:737)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(X MLParser.java:107)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(AbstractSAXParser.java:1205)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(SAXParserImpl.java:522)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:181)
... 10 more



Any idea is very helpful.

Thanks in advance,

Waldemar Neto

PS: sorry if my question was a crossing question, because i usaing the
plugin ATL for load these models.
Re: [EMF] Loading UML Magicdraw models [message #423841 is a reply to message #423840] Tue, 07 October 2008 19:37 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30810
Registered: July 2009
Senior Member
Waldemar,

It's best to ask on the UML2 newsgroup because I don't have a clue about
how profile magic works. I've added it to the "to" list of the reply,
so no need to repost.



Waldemar Neto wrote:
> Hi,
>
> I need load UML models exported from MagicDraw. To load these models i
> configure UML environment as said in the section Programmatic
> Migration in the article:
>
> http://www.eclipse.org/modeling/mdt/uml2/docs/guides/UML2_2. 0_Migration_Guide/guide.html
>
>
> Well, but when a run my program these exception is throwed:
>
> rs.emf4atl.ASMEMFModel.loadASMEMFModel(ASMEMFModel.java:365)
> at
> org.eclipse.m2m.atl.engine.AtlEMFModelHandler.loadModel(AtlE MFModelHandler.java:222)
>
> at
> br.edu.gmf.udt.m2m.atl.ATLExecutor.createASMMetamodel(ATLExe cutor.java:235)
>
> at
> br.edu.gmf.udt.m2m.atl.ATLExecutor.initInputModels(ATLExecut or.java:288)
> at
> br.edu.gmf.udt.m2m.atl.ATLExecutor.makeTransformation(ATLExe cutor.java:256)
>
> at
> br.edu.gmf.udt.m2m.atl.ATLExecutor.executeTransformations(AT LExecutor.java:335)
>
> at br.edu.gmf.udt.AbsExecutor.generateTests(AbsExecutor.java:28 )
> at br.edu.gmf.udt.UDTExecutor.main(UDTExecutor.java:53)
> Caused by: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package
> with uri 'http:///_zrN_0SUoEdmNXYQzyImvfA.profile.uml2' not found.
> ( file:///C:/Users/Netuh/Desktop/eclipse%20Place/workspace/UDT 2/IN,
> 18218, 99)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.getPackageForURI(X MLHandler.java:2566)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.getFactoryForPrefi x(XMLHandler.java:2398)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType (XMLHandler.java:1276)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XM LHandler.java:1445)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:1010)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMI Handler.java:87)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:992)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:712)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHa ndler.java:167)
>
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .startElement(AbstractSAXParser.java:501)
>
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocume ntParser.emptyElement(AbstractXMLDocumentParser.java:179)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScanner Impl.scanStartElement(XMLNSDocumentScannerImpl.java:377)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDriver.next(XMLDocumentFragmentSca nnerImpl.java:2747)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.next(XMLDocumentScannerImpl.java:648)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScanner Impl.next(XMLNSDocumentScannerImpl.java:140)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java: 510)
>
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:807)
>
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:737)
>
> at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(X MLParser.java:107)
>
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(AbstractSAXParser.java:1205)
>
> at
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(SAXParserImpl.java:522)
>
> at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
> at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:181)
> .. 10 more
>
>
>
> Any idea is very helpful.
>
> Thanks in advance,
>
> Waldemar Neto
>
> PS: sorry if my question was a crossing question, because i usaing the
> plugin ATL for load these models.
>
Re: [EMF] Loading UML Magicdraw models [message #423844 is a reply to message #423841] Tue, 07 October 2008 22:01 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Waldemar ,

I'm no expert with MagicDraw but it is my understanding that they do not use
the opensource UML2 API and their serialization may (probably) be
incompatible.
see: http://wiki.eclipse.org/MDT-UML2-Tool-Compatibility

You will have to somehow convert their format to the .uml format before the
tips in the migration guide can help. The code in that guide indicate how
to open up models serialized with the .uml format.

Can you provide a snippet of the model you are trying to open from
MagicDraw.

Cheers,
- James.



"Ed Merks" <Ed.Merks@gmail.com> wrote in message
news:gcgdp3$udi$1@build.eclipse.org...
> Waldemar,
>
> It's best to ask on the UML2 newsgroup because I don't have a clue about
> how profile magic works. I've added it to the "to" list of the reply, so
> no need to repost.
>
>
>
> Waldemar Neto wrote:
>> Hi,
>>
>> I need load UML models exported from MagicDraw. To load these models i
>> configure UML environment as said in the section Programmatic Migration
>> in the article:
>>
>> http://www.eclipse.org/modeling/mdt/uml2/docs/guides/UML2_2. 0_Migration_Guide/guide.html
>>
>> Well, but when a run my program these exception is throwed:
>>
>> rs.emf4atl.ASMEMFModel.loadASMEMFModel(ASMEMFModel.java:365)
>> at
>> org.eclipse.m2m.atl.engine.AtlEMFModelHandler.loadModel(AtlE MFModelHandler.java:222)
>> at
>> br.edu.gmf.udt.m2m.atl.ATLExecutor.createASMMetamodel(ATLExe cutor.java:235)
>> at
>> br.edu.gmf.udt.m2m.atl.ATLExecutor.initInputModels(ATLExecut or.java:288)
>> at
>> br.edu.gmf.udt.m2m.atl.ATLExecutor.makeTransformation(ATLExe cutor.java:256)
>> at
>> br.edu.gmf.udt.m2m.atl.ATLExecutor.executeTransformations(AT LExecutor.java:335)
>> at br.edu.gmf.udt.AbsExecutor.generateTests(AbsExecutor.java:28 )
>> at br.edu.gmf.udt.UDTExecutor.main(UDTExecutor.java:53)
>> Caused by: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package
>> with uri 'http:///_zrN_0SUoEdmNXYQzyImvfA.profile.uml2' not found.
>> ( file:///C:/Users/Netuh/Desktop/eclipse%20Place/workspace/UDT 2/IN, 18218,
>> 99)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.getPackageForURI(X MLHandler.java:2566)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.getFactoryForPrefi x(XMLHandler.java:2398)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType (XMLHandler.java:1276)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XM LHandler.java:1445)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:1010)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMI Handler.java:87)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:992)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:712)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHa ndler.java:167)
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .startElement(AbstractSAXParser.java:501)
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocume ntParser.emptyElement(AbstractXMLDocumentParser.java:179)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScanner Impl.scanStartElement(XMLNSDocumentScannerImpl.java:377)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDriver.next(XMLDocumentFragmentSca nnerImpl.java:2747)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.next(XMLDocumentScannerImpl.java:648)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScanner Impl.next(XMLNSDocumentScannerImpl.java:140)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java: 510)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:807)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:737)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(X MLParser.java:107)
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(AbstractSAXParser.java:1205)
>> at
>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(SAXParserImpl.java:522)
>> at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
>> at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:181)
>> .. 10 more
>>
>>
>>
>> Any idea is very helpful.
>>
>> Thanks in advance,
>>
>> Waldemar Neto
>>
>> PS: sorry if my question was a crossing question, because i usaing the
>> plugin ATL for load these models.
>>
Re: [EMF] Loading UML Magicdraw models [message #423847 is a reply to message #423844] Tue, 07 October 2008 23:39 Go to previous message
neto Mising name is currently offline neto Mising nameFriend
Messages: 33
Registered: July 2009
Member
hi,

well, i m sure that is compatible. Using the eclipse plugin ATL gui, the
models from Magicdraw are loaded correctly (as so as the Omondo models)
using the mdt.uml2 as metamodel. But, by the java code these exception is
throwed. I think that i need register some Resource.

i read these post, is a near problem, but i didnt understood the solution.

http://dev.eclipse.org/newslists/news.eclipse.modeling.m2m/m sg00956.html

the header of xmi generated by the magic draw is:

<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:MagicDrawProfile="http:///schemas/MagicDrawProfile/_CxnngHntEd2tfOBIvlYxCw/0"
xmlns:UMLProfileforJava="http:///schemas/UMLProfileforJava/_CjXwIHntEd2tfOBIvlYxCw/0"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:uml="http://www.eclipse.org/uml2/2.0.0/UML"
xsi:schemaLocation="http:///schemas/MagicDrawProfile/_CxnngHntEd2tfOBIvlYxCw/0
UML_Standard_Profile.MagicDraw_Profile.profile.uml#_Dexor3nt Ed2tfOBIvlYxCw
http:///schemas/UMLProfileforJava/_CjXwIHntEd2tfOBIvlYxCw/0
UML_Profile_for_Java.profile.uml#_DevzQXntEd2tfOBIvlYxCw">
<uml:Model xmi:id="eee_1045467100313_135436_1" name="Data" viewpoint="">
<ownedComment xmi:id="_15_5_5cd0205_1220296941577_29498_210"
body="Author:Netuh.&#xA;Created:9/1/08 4:22
PM.&#xA;Title:.&#xA;Comment:.&#xA;"
annotatedElement="eee_1045467100313_135436_1"/>
<packageImport xmi:id="_0primitiveTypesData">
<importedPackage xmi:type="uml:Model"
href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
</packageImport>
<packageImport xmi:id="_0javaPrimitiveTypesData">
<importedPackage xmi:type="uml:Model"
href="pathmap://UML_LIBRARIES/JavaPrimitiveTypes.library.uml#_0"/>
</packageImport>
...

Thanks again.

Waldemar Neto
Previous Topic:[EMF] [Teneo] : benchmarks ? And Return of Experience ?
Next Topic:CDO, transient features, and views?
Goto Forum:
  


Current Time: Tue Jan 21 11:55:28 GMT 2020

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

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

Back to the top