XSD -> Ecore -> XML <- ATL -> XML -> Ecore -> XSD [message #97651] |
Wed, 14 January 2009 11:28  |
Eclipse User |
|
|
|
Originally posted by: postit.post.it
Hello,
I am trying to turn two XSDs into ecore metamodels, and I succeeded in doing
this. Using EMF I can now generate an editor that creates XML instances for
the XSDs.
However, when I try to execute an ATL transformation on one XML instance, to
obtain an instance of the other model, I get the error below (My.gse is an
XML file conforming to the ecore model generated from the XSD and to the XSD
itself of course).
I defined the two ecore models created from the XSDs as metamodels, and I
consider their XML instances as the models when I run the transformation.
Do I miss a step here? Do I have to define the models as ecore files too?
How do I make sure they comply with the metamodels based on XSD?
Can somebody put me on the right track? (Yes, I can do this with XSLT,
without the ecore deviation, but I want to use the ecore stuff to build
Eclipse editors for the metamodels...)
Thank you for any help!
Bart Decuypere
eclipse.buildId=M20080911-1700
java.version=1.6.0_11
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=nl_BE
Command-line arguments: -os win32 -ws win32 -arch x86 -clean
Error
Wed Jan 14 17:01:01 CET 2009
An internal error occurred during: "Launching bla".
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
org.eclipse.emf.ecore.xmi.ClassNotFoundException: Class 'books' not found.
(platform:/resource/test/src/book/My.gse, 2, 40)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:315)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:274)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:397)
at org.eclipse.m2m.atl.engine.emfvm.lib.Model.<init>(Model.java:67)
at
org.eclipse.m2m.atl.engine.emfvm.AtlEMFSpecificVM.actualLaun ch(AtlEMFSpecificVM.java:153)
at
org.eclipse.m2m.atl.engine.emfvm.AtlEMFSpecificVM.launch(Atl EMFSpecificVM.java:120)
at
org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:42)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:764)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:614)
at
org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:880)
at
org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlu gin.java:1083)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.eclipse.emf.ecore.xmi.ClassNotFoundException: Class 'books'
not found. (platform:/resource/test/src/book/My.gse, 2, 40)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.validateCreateObje ctFromFactory(XMLHandler.java:2229)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.validateCreateObje ctFromFactory(XMLHandler.java:2220)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType (XMLHandler.java:1318)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XM LHandler.java:1454)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:1019)
at
org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMI Handler.java:83)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:1001)
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(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScanner Impl.scanStartElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScanner Impl$NSContentDriver.scanRootElementHook(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDriver.next(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$PrologDriver.next(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.next(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScanner Impl.next(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:181)
at
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1445)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1241)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:255)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:270)
.... 10 more
|
|
|
|
|
|
[ATL] Re: XSD -> Ecore -> XML <- ATL -> XML -> Ecore -> XSD [message #100031 is a reply to message #98440] |
Mon, 16 February 2009 03:54  |
Eclipse User |
|
|
|
Michael Igler wrote:
> Hello Bart,
>
> didn't try xsd2ecore yet but I made the XSD tutorial from
> openArchitectureWare:
>
> http://www.openarchitectureware.org/pub/documentation/4.3.1/ html/contents/xsd_tutorial.html
>
>
> Adopted it to my project and it runs perfectly.
> It can import XSD directly as metamodels.
>
> Maybe this is something for you....?
>
>
> Mike
>
>
> Bart Decuypere wrote:
>
>> Michael,
>
>>> How have you done this. Is there a tutorial out there to do so?
>
>> I installed xsd2ecore 2.4.1 from the EMF SDK update site.
>
>> If you create a new EMF model, you can choose create it from an XSD file.
>
>> However, the feature seems to be rather unstable, since it doesn't
>> work anymore for me at the moment.
>
>> If it works for you, would you like to share your eclipse
>> configuration with me? I've been experimenting with ATL and QVT in the
>> same eclipse installation, and things seem to be interfering with one
>> another.
>
>> Bart Decuypere
>
Some time ago, I've also worked with EMF-XSD and ATL. You can have a
look at my solution, in case it helps:
http://ssel.vub.ac.be/viewvc/hibernate-mapping-3.0/
Kind regards,
Dennis
|
|
|
Powered by
FUDForum. Page generated in 0.08355 seconds