|
Re: model loading standalone application [message #633111 is a reply to message #633057] |
Fri, 15 October 2010 07:50   |
Eclipse User |
|
|
|
Alexandre,
Any necessary registrations that are normally done via declarations in
the plugin.xmls must be done manually. In the case below, you've
obviously (to me) not registered XSDResourceFactoryImpl to handle the
"xsd" extension.
rastacwar@hotmail.com wrote:
> Hi,
>
> I've created an Acceleo project to generate code from a XSD file.
>
> I need it to be runnable in standalone/headless mode.
>
> First, I create my jar file containing classes and template files.
> Then, I edit the manifest.mf to specify all the jarfiles needed and
> the mainclass.
>
> When i try to run the jar, i obtain this error :
>
> Exception in thread "main"
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos
> ticWrappedException: org.eclipse.emf.ecore.xmi.ClassNotFoundException:
> Class 'schema' is not found or is abstract.
> (file:///C:/test/xsdfile.xsd, 3, 101) 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.acceleo.common.utils.ModelUtils.load(ModelUtils. java:346)
> at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.
> initialize(AbstractAcceleoGenerator.java:311) at
> myProj.Generatexsd.<init>(Generatexsd.java:86) at
> myProj.Generatexsd.main(Generatexsd.java:138) Caused by:
> org.eclipse.emf.ecore.xmi.ClassNotFoundException: Class 'schema' is
> not found or is abstract. (file:///C:/test/xsdfile.xsd, 3, 101) at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.validateCreateObje
> ctFromFactory(XMLHandler.java:2244) at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.validateCreateObje
> ctFromFactory(XMLHandler.java:2235) at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType
> (XMLHandler.java:1332) at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XM
> LHandler.java:1468) 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:169) at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser
> .startElement(Unknown Source) at
> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.
> startElement(Unknown Source) at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS
> cannerImpl.scanStartElement(Unknown Source) at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm
> pl$ContentDriver.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.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:1494) at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour
> ceImpl.java:1282) 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) .. 5 more
> Google let me think that it was a registration problem of a package
> and/or a factory but i fail to find the solution...
>
> It will be very nice from you if you've a lead to help me to resolve
> my problem.
>
> PS : Sorry for my english :blush:
>
> Alexandre
|
|
|
|
Powered by
FUDForum. Page generated in 0.27979 seconds