Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » Nullpointer XMLHandler#createObjectFromFeatureType - Reference internal a second metamodel
Nullpointer XMLHandler#createObjectFromFeatureType - Reference internal a second metamodel [message #826005] Wed, 21 March 2012 14:24 Go to next message
Sascha Petersen is currently offline Sascha PetersenFriend
Messages: 3
Registered: March 2012
Junior Member
my genmodel contains to ecore-Metamodels (xjustiz.ecore, xdome.ecore). One Reference in metamodel_1 reference on an element in metamodel_2, like:
<XJustiz_Daten xsi:schemaLocation="" xmlns:ns1="" xmlns="" xmlns:xsi="">
  <Grunddaten XJustizVersion="1.3">
    <! is some other stuff...-->
      <XDOMEA XDOMEA_Version="1.0">

The code to read the xml is as follow:
ResourceSet resourceSet = new ResourceSetImpl();
				new XjustizResourceFactoryImpl());

URI url = URI.createFileURI("text.xml");
Resource resource = resourceSet.getResource(url, true);

When I start the transformation I get the following exception
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFeatureType(
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(

The causes by the EStructuralFeature.getEType() don't have an EPackage registered.

If I remove the nodes with "<XDOMEA XDOMEA_Version="1.0">" it works fine.

Have somebody an idea what's going wrong?

[Updated on: Wed, 21 March 2012 14:25]

Report message to a moderator

Re: Nullpointer XMLHandler#createObjectFromFeatureType - Reference internal a second metamodel [message #826503 is a reply to message #826005] Thu, 22 March 2012 06:23 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33073
Registered: July 2009
Senior Member
Is this XML well formed and conforming to the schemas? Given you have
ns1:XDOMEA_Date as well, I get the sense that this element too should be
qualified with ns1.

On 21/03/2012 3:24 PM, Sascha Petersen wrote:
> <XDOMEA XDOMEA_Version="1.0">

Ed Merks
Professional Support:
Previous Topic:[ATL] Is it possible to two classes (input) into one class (output) in a rule
Next Topic:[QVT] IN Model URI does not accept non XMI input
Goto Forum:

Current Time: Thu Feb 22 19:14:30 GMT 2024

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

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

Back to the top