cancel
Showing results for 
Search instead for 
Did you mean: 

Null Pointer error when opening an Activiti diagram

pranam
Champ in-the-making
Champ in-the-making
Dear all,

I have been modelling a process using Activiti Process Designer on Eclipse and was able to model without issues. But all of a sudden, one of the diagrams stopped opening. If I try to open the diagram in Eclipse getting the below error. Could you please advice? I am using Eclipse Indigo Version: Indigo Service Release 1 Build id: 20110916-0149. Thank you in advance.

java.lang.NullPointerException
   at org.eclipse.graphiti.internal.services.impl.MigrationServiceImpl.shouldMigrate070To080(MigrationServiceImpl.java:85)
   at org.activiti.designer.eclipse.editor.ActivitiDiagramEditor.setInput(ActivitiDiagramEditor.java:118)
   at org.eclipse.gef.ui.parts.GraphicalEditor.init(GraphicalEditor.java:346)
   at org.eclipse.graphiti.ui.internal.editor.DiagramEditorInternal.init(DiagramEditorInternal.java:1093)
   at org.activiti.designer.eclipse.editor.ActivitiDiagramEditor.init(ActivitiDiagramEditor.java:51)
   at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:828)
   at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:647)
   at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
   at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
   at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
   at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2945)
   at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2850)
   at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2842)
   at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2793)
   at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
   at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2789)
   at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2773)
   at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2764)
   at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
   at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
   at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:355)
   at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:164)
   at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:249)
   at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:228)
   at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:275)
   at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251)
   at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:376)
   at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:538)
   at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
   at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:866)
   at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
   at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
   at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
   at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:864)
   at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1152)
   at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1256)
   at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275)
   at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:269)
   at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:309)
   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:2696)
   at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
   at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
   at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
   at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
   at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
   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(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:622)
   at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
   at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
4 REPLIES 4

ct1
Champ in-the-making
Champ in-the-making
Sirs:

I did not see a reply to this post.

I experienced the same problem with Eclipse 5.8 using Eclipse Helios Service Release 2, Build id: 20110218-0911.

Pranam,
Did you resolve it yourself?  If so, please share what you did?

Thank you.


    java.lang.NullPointerException
    at org.eclipse.graphiti.internal.services.impl.MigrationServiceImpl.shouldMigrate070To080(MigrationServiceImpl.java:85)
    at org.activiti.designer.eclipse.editor.ActivitiDiagramEditor.setInput(ActivitiDiagramEditor.java:118)
    at org.eclipse.gef.ui.parts.GraphicalEditor.init(GraphicalEditor.java:346)
    at org.eclipse.graphiti.ui.internal.editor.DiagramEditorInternal.init(DiagramEditorInternal.java:1093)
    at org.activiti.designer.eclipse.editor.ActivitiDiagramEditor.init(ActivitiDiagramEditor.java:51)
    at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:798)
    at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:647)
    at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
    at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
    at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
    at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
    at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
    at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
    at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
    at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1254)
    at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1207)
    at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1606)
    at org.eclipse.ui.internal.PartStack.add(PartStack.java:497)
    at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103)
    at org.eclipse.ui.internal.PartStack.add(PartStack.java:483)
    at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112)
    at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63)
    at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:225)
    at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:213)
    at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:778)
    at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:677)
    at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:638)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2860)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768)
    at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760)
    at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2682)
    at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
    at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
    at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:365)
    at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:168)
    at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:229)
    at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:208)
    at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274)
    at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
    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$5.handleEvent(ActionContributionItem.java:411)
    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:4066)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
    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:369)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    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:620)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
The bpmn20 file:


<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlnsSmiley Surprisedmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsSmiley Surprisedmgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
  <process id="B-Process" name="B-Process">
    <documentation>Place documentation for the 'B-Process' process here.</documentation>
    <scriptTask id="bProcessLog" name="B Process Log" scriptFormat="groovy">
      <script><![CDATA[Date now = new Date();
String nowStr = now.format('yyyy/MM/dd HH:mm:ss SSS');
print "B-Process started at $nowStr \n";]]></script>
    </scriptTask>
    <endEvent id="procBTimerEnd" name="ProcB Timer End"></endEvent>
    <sequenceFlow id="flow3" name="" sourceRef="bProcessLog" targetRef="nap"></sequenceFlow>
    <sequenceFlow id="flow4" name="" sourceRef="nap" targetRef="procBTimerEnd"></sequenceFlow>
    <scriptTask id="nap" name="Nap" activiti:async="true" scriptFormat="groovy">
      <script><![CDATA[print "B-Process going to sleep\n";Thread.sleep(5000);print "B-Process is awake now.\n";]]></script>
    </scriptTask>
    <startEvent id="bProcessStart" name="B-Process-Start"></startEvent>
    <sequenceFlow id="flow5" name="" sourceRef="bProcessStart" targetRef="bProcessLog"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_B-Process">
    <bpmndi:BPMNPlane bpmnElement="B-Process" id="BPMNPlane_B-Process">
      <bpmndi:BPMNShape bpmnElement="bProcessLog" id="BPMNShape_bProcessLog">
        <omgdc:Bounds height="55" width="105" x="300" y="160"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="procBTimerEnd" id="BPMNShape_procBTimerEnd">
        <omgdc:Bounds height="35" width="35" x="640" y="170"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="nap" id="BPMNShape_nap">
        <omgdc:Bounds height="55" width="105" x="460" y="160"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="bProcessStart" id="BPMNShape_bProcessStart">
        <omgdc:Bounds height="35" width="35" x="180" y="170"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
        <omgdi:waypoint x="405" y="187"></omgdi:waypoint>
        <omgdi:waypoint x="460" y="187"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
        <omgdi:waypoint x="565" y="187"></omgdi:waypoint>
        <omgdi:waypoint x="640" y="187"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
        <omgdi:waypoint x="215" y="187"></omgdi:waypoint>
        <omgdi:waypoint x="300" y="187"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

trademak
Star Contributor
Star Contributor
Hi,

Please upgrade to Activiti Designer 5.9.1 and Eclipse Indigo. I think this error will not be present there anymore.

Best regard,

ct1
Champ in-the-making
Champ in-the-making
Thank you for the quick response.

I am unable to upgrade at this time because my project is to build some load test benchmarks in 5.8 to use in doing load tests in 5.9.  The definition of my project prevents me from using 5.9.

Any other ideas?

I appreciate your help.

trademak
Star Contributor
Star Contributor
Hi,

The Activiti Designer 5.9.1 can also be used for Activiti 5.8 without any problems.

Best regards,