Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[henshin-dev] Mysterious exceptions with my Eclipse-based Henshin-Application

Hello all,

Whilst developing my Henshin-application in Eclipse, I came across a very strange error I can't explain. A co-worker of mine, having experience with Eclipse and EMF, already hat a look at my source but doesn't have a clue, too.

What am I doing:
I'm developing my application as a Eclipse plugin. I'm running the plugin in a Eclipse runtime environment via clicking on the Toolbar-button, which instantiates/runs a IWorkbenchWindowActionDelegate.

the run()-Method of this action does the following:
public void run(IAction action) {
	model=new DataModel();
	
	input =new InputDataDialog(window.getShell(),model);
	input.open();
	
	if (model.getModelFile().endsWith(".uml")){
	patchEngine= new UMLPatchEngine(model);
	} else
	if (model.getModelFile().endsWith(".bpmn2")){
	patchEngine= new BPMNPatchEngine(model);
	}
	patchEngine.load();
	patchEngine.test();
	patchEngine.match();
	new PatchDialog(window.getShell(),model,patchEngine).open();
	patchEngine.save();
}

patchEngine.load() especially does:
Resource resource = resourceSet.getResource(model.getModelFile());
model.setModelGraph(new EGraphImpl(resource));


Now my problem: I start the runtime-Eclipse, do a transformation or not (via the PatchDialog) and the window closes normally. Now, If I instantiate my Plugin-Action a second time, I get a wild bunch of exceptions which read as if there is a problem loading the UML standard-profile (see attached file).

The only hint I got so far is the following:
If I comment out the following line in my save-method (which saves the transformed model), the exceptions don't occur:

resource2.getContents().addAll(model.getModelGraph().getRoots());

(resource2 is of type org.eclipse.emf.ecore.resource.Resource).


Strangely enough, this problem doesn't occur in in the class working with BPMN-Files.

As you can see from my source-excerpts, every objects are newly created when activating the action (Henshin ResourceSets, Eclipse ResourceSets, TransformationEngines and so on). I don't have static variables in my program, but maybe there is a problem when re-instanciating Henshin-Classes or something getting cached or so?


Any hints?

Slightly confused,

Jens
!MESSAGE org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'http://www.eclipse.org/uml2/schemas/Standard/1' is not legal. (pathmap://UML_PROFILES/Standard.profile.uml, 764, 126)
!STACK 0
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'http://www.eclipse.org/uml2/schemas/Standard/1' is not legal. (pathmap://UML_PROFILES/Standard.profile.uml, 764, 126)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:315)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:397)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObject(ResourceSetImpl.java:216)
	at org.eclipse.uml2.uml.util.UMLUtil.getProfile(UMLUtil.java:8864)
	at org.eclipse.uml2.uml.util.UMLUtil.getNamedElement(UMLUtil.java:8943)
	at org.eclipse.uml2.uml.util.UMLUtil.getNamedElement(UMLUtil.java:8900)
	at org.eclipse.uml2.uml.util.UMLUtil.getStereotype(UMLUtil.java:8955)
	at org.eclipse.uml2.uml.util.UMLUtil.getStereotype(UMLUtil.java:8973)
	at org.eclipse.uml2.uml.internal.operations.ElementOperations.getAppliedStereotypes(ElementOperations.java:335)
	at org.eclipse.uml2.uml.internal.impl.ElementImpl.getAppliedStereotypes(ElementImpl.java:245)
	at org.eclipse.uml2.uml.internal.operations.ElementOperations.getAppliedStereotype(ElementOperations.java:359)
	at org.eclipse.uml2.uml.internal.impl.ElementImpl.getAppliedStereotype(ElementImpl.java:258)
	at org.eclipse.uml2.uml.internal.operations.ClassOperations.isMetaclass(ClassOperations.java:170)
	at org.eclipse.uml2.uml.internal.impl.ClassImpl.isMetaclass(ClassImpl.java:1241)
	at org.eclipse.uml2.uml.internal.operations.ClassOperations.getExtensions(ClassOperations.java:114)
	at org.eclipse.uml2.uml.internal.impl.ClassImpl.getExtensions(ClassImpl.java:999)
	at org.eclipse.uml2.uml.internal.impl.ClassImpl.eGet(ClassImpl.java:1538)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1021)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1013)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1008)
	at org.eclipse.emf.henshin.interpreter.impl.EGraphImpl.computeTransitiveClosure(EGraphImpl.java:187)
	at org.eclipse.emf.henshin.interpreter.impl.EGraphImpl.computeTransitiveClosure(EGraphImpl.java:194)
	at org.eclipse.emf.henshin.interpreter.impl.EGraphImpl.computeTransitiveClosure(EGraphImpl.java:189)
	at org.eclipse.emf.henshin.interpreter.impl.EGraphImpl.computeTransitiveClosure(EGraphImpl.java:189)
	at org.eclipse.emf.henshin.interpreter.impl.EGraphImpl.computeTransitiveClosure(EGraphImpl.java:189)
	at org.eclipse.emf.henshin.interpreter.impl.EGraphImpl.computeTransitiveClosure(EGraphImpl.java:189)
	at org.eclipse.emf.henshin.interpreter.impl.EGraphImpl.computeTransitiveClosure(EGraphImpl.java:194)
	at org.eclipse.emf.henshin.interpreter.impl.EGraphImpl.computeTransitiveClosure(EGraphImpl.java:194)
	at org.eclipse.emf.henshin.interpreter.impl.EGraphImpl.computeTransitiveClosure(EGraphImpl.java:194)
	at org.eclipse.emf.henshin.interpreter.impl.EGraphImpl.computeTransitiveClosure(EGraphImpl.java:189)
	at org.eclipse.emf.henshin.interpreter.impl.EGraphImpl.computeTransitiveClosure(EGraphImpl.java:194)
	at org.eclipse.emf.henshin.interpreter.impl.EGraphImpl.computeTransitiveClosure(EGraphImpl.java:189)
	at org.eclipse.emf.henshin.interpreter.impl.EGraphImpl.computeTransitiveClosure(EGraphImpl.java:194)
	at org.eclipse.emf.henshin.interpreter.impl.EGraphImpl.computeTransitiveClosure(EGraphImpl.java:189)
	at org.eclipse.emf.henshin.interpreter.impl.EGraphImpl.computeTransitiveClosure(EGraphImpl.java:189)
	at org.eclipse.emf.henshin.interpreter.impl.EGraphImpl.computeTransitiveClosure(EGraphImpl.java:194)
	at org.eclipse.emf.henshin.interpreter.impl.EGraphImpl.computeTransitiveClosure(EGraphImpl.java:189)
	at org.eclipse.emf.henshin.interpreter.impl.EGraphImpl.computeTransitiveClosure(EGraphImpl.java:194)
	at org.eclipse.emf.henshin.interpreter.impl.EGraphImpl.computeTransitiveClosure(EGraphImpl.java:189)
	at org.eclipse.emf.henshin.interpreter.impl.EGraphImpl.computeTransitiveClosure(EGraphImpl.java:189)
	at org.eclipse.emf.henshin.interpreter.impl.EGraphImpl.computeTransitiveClosure(EGraphImpl.java:189)
	at org.eclipse.emf.henshin.interpreter.impl.EGraphImpl.computeTransitiveClosure(EGraphImpl.java:189)
	at org.eclipse.emf.henshin.interpreter.impl.EGraphImpl.computeTransitiveClosure(EGraphImpl.java:189)
	at org.eclipse.emf.henshin.interpreter.impl.EGraphImpl.computeTransitiveClosure(EGraphImpl.java:189)
	at org.eclipse.emf.henshin.interpreter.impl.EGraphImpl.computeTransitiveClosure(EGraphImpl.java:189)
	at org.eclipse.emf.henshin.interpreter.impl.EGraphImpl.addGraph(EGraphImpl.java:161)
	at org.eclipse.emf.henshin.interpreter.impl.EGraphImpl.<init>(EGraphImpl.java:76)
	at antipatternpatcher.system.UMLPatchEngine.load(UMLPatchEngine.java:101)
	at antipatternpatcher.actions.MainAction.run(MainAction.java:72)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
	at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'http://www.eclipse.org/uml2/schemas/Standard/1' is not legal. (pathmap://UML_PROFILES/Standard.profile.uml, 764, 126)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2663)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(XMLHandler.java:2717)
	at org.eclipse.emf.ecore.xmi.impl.SAXXMIHandler.handleObjectAttribs(SAXXMIHandler.java:85)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFactory(XMLHandler.java:2193)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1330)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1468)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:1019)
	at org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMIHandler.java:87)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:1001)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:712)
	at org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHandler.java:169)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.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(XMLResourceImpl.java:242)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1511)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1290)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:255)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:270)
	... 78 more
Caused by: java.lang.NullPointerException
	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1127)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2658)
	... 106 more

Back to the top