UML2OWL transformation gives error [message #93539] |
Tue, 28 October 2008 17:22  |
Eclipse User |
|
|
|
A bit of background:
I have downloaded and installed the Eclipse Modeling Tools distribution of
Eclipse, which includes ATL 2.0.1.
Then, I downloaded the UML to OWL transformation from here:
http://www.eclipse.org/m2m/atl/atlTransformations/#UML2OWL
My goal is to go from UML to an OWL file (the XML representation). This
is a two step process using the UML to OWL transformation. The first
transformation takes the UML (in XMI format) to an OWL ecore model. The
second transformation takes the OWL ecore into the OWL XML representation.
I am testing this using the Museum example that comes with the UML to OWL
transformation.
I am able to transform the Museum.uml file to Museum-OWL.ecore file--or at
least it does not give me any error messages. When I look at the .ecore
file everything seems okay, although I'm not sure what kind of errors I
would look for. It is certainly well-formed XML and appears to be a valid
ecore model.
Then, I attempt to do the transform from Museum-OWL.ecore to Museum.owl.
I am doing this by creating a "Run Configuration" in Eclipse. The
metamodels are:
Source: /UML2OWL/OWL/OWL.ecore
Target: /UML2OWL/AMMACore/XML.ecore
However, when I run the transformation, I get the following stack trace.
Can anyone help?
SEVERE: -1
java.lang.ArrayIndexOutOfBoundsException: -1
at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:5 37)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eObjectForURIFra gmentSegment(BasicEObjectImpl.java:536)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:775)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:751)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1125)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1214)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(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)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:397)
at
org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFMo del(ASMEMFModel.java:345)
at
org.eclipse.m2m.atl.engine.AtlEMFModelHandler.loadModel(AtlE MFModelHandler.java:246)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.loadModel(Atl RegularVM.java:230)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:148)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:304)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:426)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:398)
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)
SEVERE: null
java.lang.NullPointerException
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:150)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:304)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:426)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:398)
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)
|
|
|
|
|
Re: UML2OWL transformation gives error [message #93867 is a reply to message #93837] |
Wed, 29 October 2008 13:19   |
Eclipse User |
|
|
|
Hi,
comments below,
Rocky Dunlap wrote:
> Hi Guillaume,
> Thanks for the update. A couple of questions:
> 1. You did not include an OWL2XML.atl file, although there is an
> OWL2XML.asm file. I'm not sure if I can run a launch configuration
> without the .atl file?
The presence of the .atl file is not necessary since there is an .asm
file. As you can see in the build.xml, this is the .asm that is called and
not the .atl. And I think you can also use the launch configuration with
an .asm file (if not i will add the .atl file to the project), but i
recommend you to use the ant script.
> 2. According to the ATL documentation I have read (some of which appears
> to be out of date) it says that compilation will happen automatically when
> an .atl file is saved (a .asm file will be generated). For some reason
> that is not happening for me. Any ideas why? Is there a way I can kick
> off the compilation manually?
This problem is surely due to the .project file. Try creating a new
UML2OWL project in your workspace. Then copy metamodels, transformations
files and build.xml in this new project. So the compilation process should
work fine again.
> Thanks,
> Rocky
> Guillaume Hillairet wrote:
>> Hello,
>> The version of UML2OWL available on the ATL use case is not up to date.
>> Try this version instead
>> http://perso.univ-lr.fr/ghillair/projects/UML2OWL.zip.
>> Regards,
>> Guillaume.
|
|
|
|
Re: UML2OWL transformation gives error [message #94441 is a reply to message #93880] |
Tue, 04 November 2008 05:35   |
Eclipse User |
|
|
|
Hi Rocky,
I've updated the UML2OWL project
(http://perso.univ-lr.fr/ghillair/projects/UML2OWL.zip), so now there is a
new version for the OWL metamodel, update in UML2OWL.atl file and i've
added the OWL2XML.atl file.
Concerning you're problem with the build.xml, you need to install AM3 for
ATL developers (see http://wiki.eclipse.org/AM3/How_Install_AM3_From_SVN)
so you can use specific am3 ant actions. You also need AM3 for the
serialization of the XML model (created by OWL2XML.atl) into a plain xml
file (owl/xml format).
Best Regards,
Guillaume.
Rocky Dunlap wrote:
>> The presence of the .atl file is not necessary since there is an .asm
>> file. As you can see in the build.xml, this is the .asm that is called and
>> not the .atl. And I think you can also use the launch configuration with
>> an .asm file (if not i will add the .atl file to the project), but i
>> recommend you to use the ant script.
> If possible, I would appreciate having the .atl file so I can see the
> rules. In addition to doing the transform, I have some research motives
> on the side, so seeing the rules would be beneficial.
> As far as I can see, the launch configuration only allows .atl files.
> When I attempt to use build.xml, ant gives me the following error. I have
> selected "Run in the same JRE as the workspace."
> Buildfile: C:Documents and SettingsRockyworkspace-atl2UML2OWLbuild.xml
> loadModels:
> BUILD FAILED
> C:Documents and SettingsRockyworkspace-atl2UML2OWLbuild.xml:34:
> Problem: failed to create task or type am3.loadModel
> Cause: The name is undefined.
> Action: Check the spelling.
> Action: Check that any custom tasks/types have been declared.
> Action: Check that any <presetdef>/<macrodef> declarations have taken
> place.
>> This problem is surely due to the .project file. Try creating a new
>> UML2OWL project in your workspace. Then copy metamodels, transformations
>> files and build.xml in this new project. So the compilation process should
>> work fine again.
> Great! The issue was the .project file as you suggested. Compilation is
> working fine now.
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.28817 seconds