Bug 415162 - NullPointerException importing XSD into process
Summary: NullPointerException importing XSD into process
Status: UNCONFIRMED
Alias: None
Product: MDT.BPMN2
Classification: Modeling
Component: Core (show other bugs)
Version: 0.7.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-15 11:00 EDT by Mark Arnold CLA
Modified: 2013-08-15 15:02 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Arnold CLA 2013-08-15 11:00:35 EDT
From a bpmn2 extension plugin project, run as eclipse application. Create new BPMN 2.0 Process diagram. Click Definitions tab. Click + on Import List. Select XSD file. Click OK. See NullPointerExce3ption in console window of the eclipse from which it was launched. The XSD being imported is EchoRequest.xsd. It resides in the same project as the model in ${projectDir}/schema/service/. I also tried putting it in the same directory as the model ${projectDir}/model/process_2.bpmn. Same results. After the exception, the import shows in the process Import List; but the edit window tab does not have asterisk showing the diagram needs to be saved. Close and reopen the process diagram and the import did not save. I tried again and moved a task in the diagram to force a dirty so I could save the diagram. Still, import did not save.

Quoted below 1) NullPointerException, 2) XSD file, 3) bpmn file...

!ENTRY org.eclipse.ui 4 0 2013-08-15 09:25:46.507
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
	at java.util.Hashtable.get(Hashtable.java:334)
	at org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter.getProperty(ExtendedPropertiesAdapter.java:145)
	at org.eclipse.bpmn2.modeler.core.merrimac.dialogs.TextObjectEditor.createControl(TextObjectEditor.java:110)
	at org.eclipse.bpmn2.modeler.core.merrimac.dialogs.TextAndButtonObjectEditor.createControl(TextAndButtonObjectEditor.java:59)
	at org.eclipse.bpmn2.modeler.core.merrimac.dialogs.ObjectEditor.createControl(ObjectEditor.java:82)
	at org.eclipse.bpmn2.modeler.ui.property.diagrams.DefinitionsPropertyComposite$ImportDetailComposite.createBindings(DefinitionsPropertyComposite.java:441)
	at org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite.setBusinessObject(AbstractDetailComposite.java:118)
	at org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractListComposite.showDetails(AbstractListComposite.java:490)
	at org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractListComposite.access$0(AbstractListComposite.java:467)
	at org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractListComposite$5$1.doExecute(AbstractListComposite.java:584)
	at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
	at org.eclipse.emf.workspace.EMFCommandOperation.doExecute(EMFCommandOperation.java:119)
	at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150)
	at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:513)
	at org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl.doExecute(WorkspaceCommandStackImpl.java:208)
	at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165)
	at org.eclipse.graphiti.ui.internal.editor.GFWorkspaceCommandStackImpl.execute(GFWorkspaceCommandStackImpl.java:84)
	at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219)
	at org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractListComposite$5.run(AbstractListComposite.java:576)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
	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:1057)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	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:354)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1426)

===================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xs:schema xmlns="http://att.com/SSF/Service/EchoRequest.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://att.com/SSF/Service/EchoRequest.xsd">
	<xs:element name="EchoRequest" type="EchoRequestInfo"/>
	<xs:complexType name="EchoRequestInfo">
		<xs:sequence>
			<xs:element minOccurs="0" name="serviceEntity" type="xs:string"/>
			<xs:element minOccurs="0" name="data" type="xs:string"/>
		</xs:sequence>
	</xs:complexType>
</xs:schema>

=======================================
<?xml version="1.0" encoding="UTF-8"?>
<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL http://www.omg.org/spec/BPMN/20100524/MODEL-XMI http://www.omg.org/spec/DD/20100524/DC http://www.omg.org/spec/DD/20100524/DC-XMI http://www.omg.org/spec/DD/20100524/DI http://www.omg.org/spec/DD/20100524/DI-XMI http://www.omg.org/spec/BPMN/20100524/DI http://www.omg.org/spec/BPMN/20100524/DI-XMI" id="Definitions_1" targetNamespace="http://m2e.att.com/rim2e/bpmn2">
  <bpmn2:process id="process_2" name="Default Process">
    <bpmn2:endEvent id="EndEvent_1">
      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
    </bpmn2:endEvent>
    <bpmn2:startEvent id="StartEvent_1">
      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
    </bpmn2:startEvent>
    <bpmn2:sequenceFlow id="SequenceFlow_1" sourceRef="StartEvent_1" targetRef="EndEvent_1"/>
  </bpmn2:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1" name="Default Process Diagram">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="process_2">
      <bpmndi:BPMNShape id="BPMNShape_1" bpmnElement="StartEvent_1">
        <dc:Bounds height="36.0" width="36.0" x="100.0" y="65.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_2" bpmnElement="EndEvent_1">
        <dc:Bounds height="36.0" width="36.0" x="500.0" y="100.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="BPMNShape_1" targetElement="BPMNShape_2">
        <di:waypoint xsi:type="dc:Point" x="136.0" y="83.0"/>
        <di:waypoint xsi:type="dc:Point" x="500.0" y="118.0"/>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn2:definitions>
Comment 1 Mark Arnold CLA 2013-08-15 11:20:14 EDT
Manually added the import to the bpmn file...
<bpmn2:import namespace="http://att.com/SSF/Service/EchoResponse.xsd" location="../schema/service/EchoRequest.xsd" importType="http://www.w3.org/2001/XMLSchema"/>
Then opened in diagram editor. The import appears in the process Import List -- with a namespace prefix. Clicked pencil button to edit and add prefix. Received the following NullPointerException...

!ENTRY org.eclipse.ui 4 0 2013-08-15 10:17:44.912
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
	at java.util.Hashtable.get(Hashtable.java:334)
	at org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter.getProperty(ExtendedPropertiesAdapter.java:145)
	at org.eclipse.bpmn2.modeler.core.merrimac.dialogs.TextObjectEditor.createControl(TextObjectEditor.java:110)
	at org.eclipse.bpmn2.modeler.core.merrimac.dialogs.TextAndButtonObjectEditor.createControl(TextAndButtonObjectEditor.java:59)
	at org.eclipse.bpmn2.modeler.core.merrimac.dialogs.ObjectEditor.createControl(ObjectEditor.java:82)
	at org.eclipse.bpmn2.modeler.ui.property.diagrams.DefinitionsPropertyComposite$ImportDetailComposite.createBindings(DefinitionsPropertyComposite.java:441)
	at org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite.setBusinessObject(AbstractDetailComposite.java:118)
	at org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractListComposite.showDetails(AbstractListComposite.java:490)
	at org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractListComposite.access$0(AbstractListComposite.java:467)
	at org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractListComposite$9.run(AbstractListComposite.java:690)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
	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:1057)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	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:354)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
Comment 2 Mark Arnold CLA 2013-08-15 11:54:28 EDT
Opened eclipse directly (instead of launching from plugin project). Tried to add to Import List. Got a popup saying NullPointerException.
Comment 3 Mark Arnold CLA 2013-08-15 15:02:07 EDT
Fixed, maybe: Importing XSD works if I GIT version 0.2.6.qualifier of the following plugins into the same workspace as the plugin developement workspace...
org.eclipse.bpmn2.modeler.ui 
org.ecliopse.bpmn2.modeler.core
...and then launch my bpmn2 plugin as eclipse application to the workspace containing the bpmn model into which I am importing the XSD.