|
Re: [Acceleo] Package with uri 'http://www.eclipse.org/uml2/3.0.0/UML' not found [message #537234 is a reply to message #537174] |
Tue, 01 June 2010 15:57 |
Stephane Bouchet Messages: 280 Registered: July 2009 |
Senior Member |
|
|
Hi Lima,
it means your uml model ( /C:/Users/Lima/workspace/AAceleo/example01.uml
) use the uml2 3.0.0 metamodel, and acceleo ( thru emf ) cannot find the
metamodel in eclipse.
did you use a modeling tool inside eclipse to create your model ?
Lima a écrit :
> Hello guys, I'm beginning my studies in m2t transformations and when I
> try to do a transformation from a model (based on a metamodel that I've
> created), I keep getting this error message:
>
>
> Exception in thread "main"
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
> org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri
> 'http://www.eclipse.org/uml2/3.0.0/UML' not found.
> (file:/C:/Users/Lima/workspace/AAceleo/example01.uml, 3, 75)
> 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 AAceleo.files.Generate.<init>(Generate.java:83)
> at AAceleo.files.Generate.main(Generate.java:125)
> Caused by: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package
> with uri 'http://www.eclipse.org/uml2/3.0.0/UML' not found.
> (file:/C:/Users/Lailson/workspace/AAceleo/example01.uml, 3, 75)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.getPackageForURI(X MLHandler.java:2590)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.getFactoryForPrefi x(XMLHandler.java:2421)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType (XMLHandler.java:1299)
>
> 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:87)
>
> 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.XMLDocumentFragmentS cannerImpl.scanStartElement(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.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
>
>
> What can I do to make Acceleo recognize this package
> (http://www.eclipse.org/uml2/3.0.0/UML)? I tried having a "uml.ecore"
> file inside my project whith that same URI but the problem persists :(.
--
Cheers,
Stéphane Bouchet, OBEO
|
|
|
|
Re: [Acceleo] Package with uri 'http://www.eclipse.org/uml2/3.0.0/UML' not found [message #537358 is a reply to message #537257] |
Wed, 02 June 2010 07:41 |
|
This is a multi-part message in MIME format.
--------------010802060102070500020107
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Hi Lima,
The issue lies in how you launch your generation. When launching it
standalone, you need to register the metamodel manually (see explanation
on
http://wiki.eclipse.org/MDT/UML2/FAQ#What.27s_required_to_lo ad_a_UML_.28.uml.29_resource_from_a_standalone_application.3 F
). We allow for these registrations in the generated java class (method
"registerPackages(ResourceSet)".
This only applies when you launch your generation as a standalone
application (if you use the Acceleo Launch configuration, it is
represented as the "Java Application" choice in the "Runner" combo box
at the bottom). If you instead select "Acceleo Plug-in application", you
shouldn't have this problem.
Laurent Goubet
Obeo
Lima wrote:
> Thannks for you quick answer Stephane,
>
> I made the model using the Magic Draw tool and used the "export xmi"
> option there. It's odd because when we create a new Acceleo project, the
> uml2 3.0.0 metamodel appears in the list of metamodels so I thought that
> Acceleo should be able to identify this metamodel in eclipse. Do you
> know what can I do to make Acceleo find this metamodel?
--------------010802060102070500020107
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"
YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------010802060102070500020107--
|
|
|
Powered by
FUDForum. Page generated in 0.03399 seconds