cancel
Showing results for 
Search instead for 
Did you mean: 

NPE when 'Open Declaration'

hbpost
Champ in-the-making
Champ in-the-making
Hi,

I'm getting a NPE when I try to open a declaration on an Activiti class.  I believe I have the source correctly installed in my maven repo.  I'm using Indigo SP2, with Activiti 5.11.  The error is as follows:

!ENTRY org.eclipse.ui 4 4 2013-05-13 21:32:03.786
!MESSAGE "Open Declaration" did not complete normally.  Please see the log for more information.

!ENTRY org.eclipse.ui 4 0 2013-05-13 21:32:03.787
!MESSAGE java.lang.NullPointerException
!STACK 0
java.lang.NullPointerException
   at org.activiti.designer.eclipse.editor.ActivitiDiagramMatchingStrategy.matches(ActivitiDiagramMatchingStrategy.java:20)
   at org.eclipse.ui.internal.EditorManager.findEditors(EditorManager.java:510)
   at org.eclipse.ui.internal.EditorManager.findEditors(EditorManager.java:457)
   at org.eclipse.ui.internal.EditorManager.findEditor(EditorManager.java:420)
   at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2887)
   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.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:368)
   at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:174)
   at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:249)
   at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:174)
   at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:279)
   at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251)
   at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
   at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:185)
   at org.eclipse.ui.internal.handlers.LegacyHandlerWrapper.execute(LegacyHandlerWrapper.java:109)
   at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
   at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
   at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
   at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:468)
   at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:786)
   at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:885)
   at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:567)
   at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:508)
   at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:123)
   at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
   at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1262)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
   at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1104)
   at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1100)
   at org.eclipse.swt.widgets.Widget.wmKeyDown(Widget.java:1809)
   at org.eclipse.swt.widgets.Control.WM_KEYDOWN(Control.java:4892)
   at org.eclipse.swt.widgets.Control.windowProc(Control.java:4560)
   at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
   at org.eclipse.swt.widgets.Display.windowProc(Display.java:4985)
   at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
   at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2531)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
   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(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:601)
   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)
3 REPLIES 3

trademak
Star Contributor
Star Contributor
Can you please upgrade to Actviti Designer 5.12.0 and see if it works there. We made some improvements in that area.

Best regards,

pprikryl
Champ in-the-making
Champ in-the-making
Same problem:
go: maven dependencis - activity.jar - double click on some class file.
eclipse juno sr2, activity 5.12
<code>
java.lang.NullPointerException
at org.activiti.designer.eclipse.editor.ActivitiDiagramMatchingStrategy.matches(ActivitiDiagramMatchingStrategy.java:20)
at org.eclipse.ui.internal.WorkbenchPage.checkEditor(WorkbenchPage.java:2225)
at org.eclipse.ui.internal.WorkbenchPage.findEditors(WorkbenchPage.java:2194)
at org.eclipse.ui.internal.WorkbenchPage.findEditor(WorkbenchPage.java:2176)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.isOpenInEditor(EditorUtility.java:131)
at org.eclipse.jdt.internal.ui.navigator.JavaFileLinkHelper.activateEditor(JavaFileLinkHelper.java:38)
at org.eclipse.ui.internal.navigator.actions.LinkEditorAction$2.run(LinkEditorAction.java:78)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.navigator.actions.LinkEditorAction$1.runInUIThread(LinkEditorAction.java:76)
at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4144)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
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:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
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:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
</code>

kingsheldor
Champ in-the-making
Champ in-the-making
I'm seeing a similar issue when I enter compare mode or try to open sources.

WORKAROUND:  Close any open activiti diagrams and repeat the action.

Log message: "Unhandled event loop exception"

Although this is at line 22, I wonder if a missing null-check at the following call is the root cause, since the IFile.getRawLocationURI() documentation indicates it can return null when the path is unable to be determined:

<code>"fileURI.equals(file.getRawLocationURI().toString())"</code>

Environment:
<code>
Activiti Designer:
    Activiti Eclipse BPMN 2.0 Designer
        5.12.0
    Graphiti (Incubation)
        0.9.2.v20130211-0913

Eclipse:
    eclipse.buildId=4.3.0.I20130605-2000
    java.version=1.6.0_51
    java.vendor=Apple Inc.
</code>

Stacktrace:
<code>
java.lang.NullPointerException
at org.activiti.designer.eclipse.editor.ActivitiDiagramMatchingStrategy.matches(ActivitiDiagramMatchingStrategy.java:20)
at org.eclipse.ui.internal.WorkbenchPage.checkEditor(WorkbenchPage.java:2227)
at org.eclipse.ui.internal.WorkbenchPage.findEditors(WorkbenchPage.java:2196)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3070)
at org.eclipse.ui.internal.WorkbenchPage.access$21(WorkbenchPage.java:3042)
at org.eclipse.ui.internal.WorkbenchPage$8.run(WorkbenchPage.java:3024)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3020)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2984)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2975)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:373)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:179)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:268)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:180)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:279)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251)
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$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4166)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1489)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1474)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1279)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4012)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3651)
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)
</code>