Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Java.lang.NullPointerException with XML.ecore metamodel
[ATL] Java.lang.NullPointerException with XML.ecore metamodel [message #64581] Tue, 23 October 2007 12:24 Go to next message
Guillaume Gauffre is currently offline Guillaume GauffreFriend
Messages: 65
Registered: July 2009
Member
Hi,

I need to use the XML metamodel to convert OWL/XML files form Protege to
use them in a particular transformation. Thus I need to have the reverse
transformation of the one used in the ODM use case from G. Hillairet to
convert owl/xmi into owl/xml.
But when I try to use XML.ecore form this use case, I've got a
NullPointerException, does anybody know why ?

Thanks,

Guillaume Gauffre

XML.ecore :
<?xml version="1.0" encoding="ISO-8859-1"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore">
<ecore:EPackage name="PrimitiveTypes">
<eClassifiers xsi:type="ecore:EDataType" name="Boolean"/>
<eClassifiers xsi:type="ecore:EDataType" name="Integer"/>
<eClassifiers xsi:type="ecore:EDataType" name="String"/>
</ecore:EPackage>
<ecore:EPackage name="XML">
<eClassifiers xsi:type="ecore:EClass" name="Node" abstract="true">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="startLine"
ordered="false" eType="/0/Integer"/>
<eStructuralFeatures xsi:type="ecore:EAttribute"
name="startColumn" ordered="false" eType="/0/Integer"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="endLine"
ordered="false" eType="/0/Integer"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="endColumn"
ordered="false" eType="/0/Integer"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name"
ordered="false" lowerBound="1" eType="/0/String"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value"
ordered="false" lowerBound="1" eType="/0/String"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="parent"
ordered="false" eType="/1/Element" eOpposite="/1/Element/children"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Attribute"
eSuperTypes="/1/Node"/>
<eClassifiers xsi:type="ecore:EClass" name="Text"
eSuperTypes="/1/Node"/>
<eClassifiers xsi:type="ecore:EClass" name="Element"
eSuperTypes="/1/Node">
<eStructuralFeatures xsi:type="ecore:EReference" name="children"
upperBound="-1" eType="/1/Node" containment="true"
eOpposite="/1/Node/parent"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Root"
eSuperTypes="/1/Element"/>
</ecore:EPackage>
</xmi:XMI>
Re: [ATL] Java.lang.NullPointerException with XML.ecore metamodel [message #64672 is a reply to message #64581] Wed, 24 October 2007 07:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: quentin.glineur.obeo.fr

This is a multi-part message in MIME format.
--------------050401030707070401070006
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Guillaume,

Can you send a trace of the raised exception and give more details about
the way you launch the transformation ?

Regards,

Quentin GLINEUR

Guillaume Gauffre a
Re: [ATL] Java.lang.NullPointerException with XML.ecore metamodel [message #64740 is a reply to message #64672] Wed, 24 October 2007 11:36 Go to previous messageGo to next message
Guillaume Gauffre is currently offline Guillaume GauffreFriend
Messages: 65
Registered: July 2009
Member
Hi,

I changed my input model by using AM3 functionnality to inject XML
content into ecore based XML, and now it works. Do you know how to use
XML injection with both launch configuration and java code ?

Thanks

Guillaume

Quentin Glineur a écrit :
> Hi Guillaume,
>
> Can you send a trace of the raised exception and give more details about
> the way you launch the transformation ?
>
> Regards,
>
> Quentin GLINEUR
>
> Guillaume Gauffre a écrit :
>> Hi,
>>
>> I need to use the XML metamodel to convert OWL/XML files form Protege
>> to use them in a particular transformation. Thus I need to have the
>> reverse transformation of the one used in the ODM use case from G.
>> Hillairet to convert owl/xmi into owl/xml.
>> But when I try to use XML.ecore form this use case, I've got a
>> NullPointerException, does anybody know why ?
>>
>> Thanks,
>>
>> Guillaume Gauffre
>>
>> XML.ecore :
>> <?xml version="1.0" encoding="ISO-8859-1"?>
>> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore">
>> <ecore:EPackage name="PrimitiveTypes">
>> <eClassifiers xsi:type="ecore:EDataType" name="Boolean"/>
>> <eClassifiers xsi:type="ecore:EDataType" name="Integer"/>
>> <eClassifiers xsi:type="ecore:EDataType" name="String"/>
>> </ecore:EPackage>
>> <ecore:EPackage name="XML">
>> <eClassifiers xsi:type="ecore:EClass" name="Node" abstract="true">
>> <eStructuralFeatures xsi:type="ecore:EAttribute"
>> name="startLine" ordered="false" eType="/0/Integer"/>
>> <eStructuralFeatures xsi:type="ecore:EAttribute"
>> name="startColumn" ordered="false" eType="/0/Integer"/>
>> <eStructuralFeatures xsi:type="ecore:EAttribute" name="endLine"
>> ordered="false" eType="/0/Integer"/>
>> <eStructuralFeatures xsi:type="ecore:EAttribute"
>> name="endColumn" ordered="false" eType="/0/Integer"/>
>> <eStructuralFeatures xsi:type="ecore:EAttribute" name="name"
>> ordered="false" lowerBound="1" eType="/0/String"/>
>> <eStructuralFeatures xsi:type="ecore:EAttribute" name="value"
>> ordered="false" lowerBound="1" eType="/0/String"/>
>> <eStructuralFeatures xsi:type="ecore:EReference" name="parent"
>> ordered="false" eType="/1/Element" eOpposite="/1/Element/children"/>
>> </eClassifiers>
>> <eClassifiers xsi:type="ecore:EClass" name="Attribute"
>> eSuperTypes="/1/Node"/>
>> <eClassifiers xsi:type="ecore:EClass" name="Text"
>> eSuperTypes="/1/Node"/>
>> <eClassifiers xsi:type="ecore:EClass" name="Element"
>> eSuperTypes="/1/Node">
>> <eStructuralFeatures xsi:type="ecore:EReference" name="children"
>> upperBound="-1" eType="/1/Node" containment="true"
>> eOpposite="/1/Node/parent"/>
>> </eClassifiers>
>> <eClassifiers xsi:type="ecore:EClass" name="Root"
>> eSuperTypes="/1/Element"/>
>> </ecore:EPackage>
>> </xmi:XMI>
>
Re: [ATL] Java.lang.NullPointerException with XML.ecore metamodel [message #64832 is a reply to message #64740] Fri, 26 October 2007 08:47 Go to previous message
Eclipse UserFriend
Originally posted by: quentin.glineur.obeo.fr

This is a multi-part message in MIME format.
--------------090609060405010307030203
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi,

the XML injection process deals with injection (TCS) and not with
transformation (ATL). Thus, you cannot use a launch config (ATL
configuration) to perform an injection.

You can inject an XML file with an ant task (am3.loadmodel specifying an
injector) or with Java code (then look at
org.eclipse.am3.ui.ActionXMLInjector class)

Regards

Quentin GLINEUR

Guillaume Gauffre a
Previous Topic:[ATL] UML2 to UM2 transformation
Next Topic:[ATL] No KM3 editor in newest bundle
Goto Forum:
  


Current Time: Tue Apr 23 15:07:15 GMT 2024

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

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

Back to the top