Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Null-Pointer-Exception in EMFGeneratorFragment(GenModel Proxy object resolution fails. Is this a bug in EMF code?)
Null-Pointer-Exception in EMFGeneratorFragment [message #1265856] Thu, 06 March 2014 16:50 Go to next message
Reiner Jung is currently offline Reiner JungFriend
Messages: 9
Registered: June 2010
Location: Uni Kiel
Junior Member
Hi folks,

presently, or more precise for days, a NullPointerException in a MWE2 workflow is bugging me. It is originating in the EMFGeneratorFragment.

I am trying to fix this issue now for a couple of days and I cannot find a solution. This problem looks similar to However, the proposed solution of modifying the ecore model is not feasible and the uri mapping option is already in place.

The setup is as follows: I have, for test purposes, made a very small language PCMXtext which includes a reference to a Palladio component model (PCM) node.

	'obj' name=ID 

The repository meta-model is imported with

import "http //" as repository

(The missing : in the URI is not an error, but a method circumvent the forums ill assumption that I want to post an URL to some external website. The real code includes that colon.)

During the MWE2 workflow a lot of GenModels are registered and it all looks fine. However, during EMFGeneratorFragment execution, the whole thing comes apart with a NullPointerException

at org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.hasExtendedMetaData(
	at org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.initialize(
	at org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.initialize(
	at org.eclipse.xtext.generator.ecore.EMFGeneratorFragment.getSaveAndReconcileGenModel(
	at org.eclipse.xtext.generator.ecore.EMFGeneratorFragment.generate(
	at org.eclipse.xtext.generator.CompositeGeneratorFragment.generate(
	at org.eclipse.xtext.generator.LanguageConfig.generate(
	at org.eclipse.xtext.generator.Generator.generate(
	at org.eclipse.xtext.generator.Generator.invokeInternal(
	at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(
	at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(
	at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(
	at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(

I looks like, a proxy object is not resolved properly and a null pointer is returned instead. However, I could be wrong, as the debugging is a really cumbersome process due to the large number of involved references.

I have attached the workflow, the grammar, the console.log, and the present MANIFEST.MF. There might be more packages listed than necessary in the MANIFEST due to my "fixing" efforts.

Any ideas and suggestions to solve this issue are welcome.

Re: Null-Pointer-Exception in EMFGeneratorFragment [message #1265870 is a reply to message #1265856] Thu, 06 March 2014 17:17 Go to previous message
Reiner Jung is currently offline Reiner JungFriend
Messages: 9
Registered: June 2010
Location: Uni Kiel
Junior Member
I've create a small example project which produces the described problem. Presently, I use Eclipse Kepler (build id 20130919-0819), Xtext 2.5.0 and Palladio 3.4.1 on a Linux machine (Ubuntu 13.10) with Java 1.7

java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

Previous Topic:Problem with automatic update of a P2 repository
Next Topic:XtextResourceSetProvider problems in junit
Goto Forum:

Current Time: Thu Dec 03 20:54:09 GMT 2020

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

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

Back to the top