java.lang.NullPointerException

Spring JIRA | Leandro de Oliveira | 7 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    After opening a spring xml file or focusing the editor in a project with spring nature added, eclipse shows a message dialog with this message: "An error has occurred when activating this view", the following stacktrace is printed on .metadata/.log: java.lang.NullPointerException at com.springsource.sts.config.ui.search.ToggleMarkOccurrencesAction.setActiveEditor(ToggleMarkOccurrencesAction.java:120) at org.eclipse.ui.internal.EditorPluginAction.editorChanged(EditorPluginAction.java:75) at org.eclipse.ui.internal.EditorActionBuilder$EditorContribution.editorChanged(EditorActionBuilder.java:83) at org.eclipse.ui.internal.EditorActionBuilder$ExternalContributor.setActiveEditor(EditorActionBuilder.java:129) at org.eclipse.ui.internal.EditorActionBars.partChanged(EditorActionBars.java:345) at org.eclipse.ui.internal.WorkbenchPage$3.run(WorkbenchPage.java:632) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.runtime.Platform.run(Platform.java:888) at org.eclipse.ui.internal.WorkbenchPage.activatePart(WorkbenchPage.java:621) at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3527) at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:614) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2869) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2762) at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2754) at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2705) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2701) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2685) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2676) 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:361) 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.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:373) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:526) at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48) at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:842) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.runtime.Platform.run(Platform.java:888) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:840) at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1101) at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1205) at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:264) at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:258) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:298) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) 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:368) 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:559) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) at org.eclipse.equinox.launcher.Main.run(Main.java:1311)

    Spring JIRA | 7 years ago | Leandro de Oliveira
    java.lang.NullPointerException
  2. 0

    After opening a spring xml file or focusing the editor in a project with spring nature added, eclipse shows a message dialog with this message: "An error has occurred when activating this view", the following stacktrace is printed on .metadata/.log: java.lang.NullPointerException at com.springsource.sts.config.ui.search.ToggleMarkOccurrencesAction.setActiveEditor(ToggleMarkOccurrencesAction.java:120) at org.eclipse.ui.internal.EditorPluginAction.editorChanged(EditorPluginAction.java:75) at org.eclipse.ui.internal.EditorActionBuilder$EditorContribution.editorChanged(EditorActionBuilder.java:83) at org.eclipse.ui.internal.EditorActionBuilder$ExternalContributor.setActiveEditor(EditorActionBuilder.java:129) at org.eclipse.ui.internal.EditorActionBars.partChanged(EditorActionBars.java:345) at org.eclipse.ui.internal.WorkbenchPage$3.run(WorkbenchPage.java:632) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.runtime.Platform.run(Platform.java:888) at org.eclipse.ui.internal.WorkbenchPage.activatePart(WorkbenchPage.java:621) at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3527) at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:614) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2869) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2762) at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2754) at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2705) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2701) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2685) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2676) 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:361) 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.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:373) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:526) at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48) at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:842) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.runtime.Platform.run(Platform.java:888) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:840) at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1101) at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1205) at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:264) at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:258) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:298) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) 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:368) 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:559) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) at org.eclipse.equinox.launcher.Main.run(Main.java:1311)

    Spring JIRA | 7 years ago | Leandro de Oliveira
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.springsource.sts.config.ui.search.ToggleMarkOccurrencesAction.setActiveEditor()
    2. com.springsource.sts
      ToggleMarkOccurrencesAction.setActiveEditor
      1. com.springsource.sts.config.ui.search.ToggleMarkOccurrencesAction.setActiveEditor(ToggleMarkOccurrencesAction.java:120)
      1 frame
    3. Eclipse UI
      WorkbenchPage$3.run
      1. org.eclipse.ui.internal.EditorPluginAction.editorChanged(EditorPluginAction.java:75)
      2. org.eclipse.ui.internal.EditorActionBuilder$EditorContribution.editorChanged(EditorActionBuilder.java:83)
      3. org.eclipse.ui.internal.EditorActionBuilder$ExternalContributor.setActiveEditor(EditorActionBuilder.java:129)
      4. org.eclipse.ui.internal.EditorActionBars.partChanged(EditorActionBars.java:345)
      5. org.eclipse.ui.internal.WorkbenchPage$3.run(WorkbenchPage.java:632)
      5 frames
    4. Eclipse Core
      Platform.run
      1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      2. org.eclipse.core.runtime.Platform.run(Platform.java:888)
      2 frames
    5. Eclipse UI
      WorkbenchPage$10.run
      1. org.eclipse.ui.internal.WorkbenchPage.activatePart(WorkbenchPage.java:621)
      2. org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3527)
      3. org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:614)
      4. org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2869)
      5. org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2762)
      6. org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2754)
      7. org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2705)
      7 frames
    6. RWT
      BusyIndicator.showWhile
      1. org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
      1 frame
    7. Eclipse UI
      WorkbenchPage.openEditor
      1. org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2701)
      2. org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2685)
      3. org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2676)
      3 frames
    8. Eclipse UI
      IDE.openEditor
      1. org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
      2. org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
      2 frames
    9. Java Development Tools UI
      PackageExplorerPart$4.open
      1. org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:361)
      2. org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:168)
      3. org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:229)
      4. org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:208)
      5. org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274)
      6. org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250)
      7. org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:373)
      8. org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:526)
      8 frames
    10. Eclipse UI
      OpenAndLinkWithEditorHelper$InternalListener.open
      1. org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
      1 frame
    11. JFace
      StructuredViewer$2.run
      1. org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:842)
      1 frame
    12. Eclipse Core
      Platform.run
      1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      2. org.eclipse.core.runtime.Platform.run(Platform.java:888)
      2 frames
    13. Eclipse UI
      JFaceUtil$1.run
      1. org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
      1 frame
    14. JFace
      OpenStrategy$1.handleEvent
      1. org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
      2. org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:840)
      3. org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1101)
      4. org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1205)
      5. org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:264)
      6. org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:258)
      7. org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:298)
      7 frames
    15. RWT
      Display.readAndDispatch
      1. org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      2. org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
      3. org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910)
      4. org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
      4 frames
    16. Eclipse UI
      Workbench$5.run
      1. org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
      2. org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
      3. org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
      4. org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
      4 frames
    17. Databinding
      Realm.runWithDefault
      1. org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      1 frame
    18. Eclipse UI
      Workbench.createAndRunWorkbench
      1. org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
      1 frame
    19. Eclipse UI
      PlatformUI.createAndRunWorkbench
      1. org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
      1 frame
    20. Eclipse IDE
      IDEApplication.start
      1. org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
      1 frame
    21. Equinox Container
      EclipseAppHandle.run
      1. org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
      1 frame
    22. Eclipse OSGi
      EclipseStarter.run
      1. org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
      2. org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
      3. org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
      4. org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
      4 frames
    23. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    24. Equinox
      Main.run
      1. org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
      2. org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
      3. org.eclipse.equinox.launcher.Main.run(Main.java:1311)
      3 frames