java.lang.NullPointerException

Spring JIRA | Ben Corrie | 8 years ago
  1. 0

    Steps to reproduce: - Create a new Dynamic Web Project called Foo and take all the defaults - Add Spring Project Nature - Select Java EE Module Dependencies in the Properties menu - Add an entry to an external jar - Add another entry to the exact same jar, then click OK - We should now have a problem as we have 2 references to the same jar - Select Java EE Module Dependencies in the Properties menu - Click in the checkbox of one of the jars to unselect it - You then get a NullPointerException - If you try to apply or OK the change, it gets ignored Looking at the Error Log, the NullPointerException occurs in org.eclipse.jface: java.lang.NullPointerException at org.eclipse.jst.j2ee.application.internal.operations.ClasspathElement.getComponent(ClasspathElement.java:186) at org.eclipse.jst.j2ee.internal.ClasspathTableManager.availableJARCheckStateChanged(ClasspathTableManager.java:469) at org.eclipse.jst.j2ee.internal.ClasspathTableManager$1.checkStateChanged(ClasspathTableManager.java:450) at org.eclipse.jface.viewers.CheckboxTableViewer$1.run(CheckboxTableViewer.java:178) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:880) 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.CheckboxTableViewer.fireCheckStateChanged(CheckboxTableViewer.java:176) at org.eclipse.jface.viewers.CheckboxTableViewer.handleSelect(CheckboxTableViewer.java:266) at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1168) at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:227) at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:221) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:388) 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:3823) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.ui.dialogs.PropertyDialogAction.run(PropertyDialogAction.java:157) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500) 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:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488) 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:193) 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:382) 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:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236) at org.eclipse.equinox.launcher.Main.main(Main.java:1212)

    Spring JIRA | 8 years ago | Ben Corrie
    java.lang.NullPointerException
  2. 0

    Steps to reproduce: - Create a new Dynamic Web Project called Foo and take all the defaults - Add Spring Project Nature - Select Java EE Module Dependencies in the Properties menu - Add an entry to an external jar - Add another entry to the exact same jar, then click OK - We should now have a problem as we have 2 references to the same jar - Select Java EE Module Dependencies in the Properties menu - Click in the checkbox of one of the jars to unselect it - You then get a NullPointerException - If you try to apply or OK the change, it gets ignored Looking at the Error Log, the NullPointerException occurs in org.eclipse.jface: java.lang.NullPointerException at org.eclipse.jst.j2ee.application.internal.operations.ClasspathElement.getComponent(ClasspathElement.java:186) at org.eclipse.jst.j2ee.internal.ClasspathTableManager.availableJARCheckStateChanged(ClasspathTableManager.java:469) at org.eclipse.jst.j2ee.internal.ClasspathTableManager$1.checkStateChanged(ClasspathTableManager.java:450) at org.eclipse.jface.viewers.CheckboxTableViewer$1.run(CheckboxTableViewer.java:178) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:880) 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.CheckboxTableViewer.fireCheckStateChanged(CheckboxTableViewer.java:176) at org.eclipse.jface.viewers.CheckboxTableViewer.handleSelect(CheckboxTableViewer.java:266) at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1168) at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:227) at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:221) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:388) 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:3823) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.ui.dialogs.PropertyDialogAction.run(PropertyDialogAction.java:157) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500) 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:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488) 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:193) 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:382) 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:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236) at org.eclipse.equinox.launcher.Main.main(Main.java:1212)

    Spring JIRA | 8 years ago | Ben Corrie
    java.lang.NullPointerException
  3. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.eclipse.jst.j2ee.application.internal.operations.ClasspathElement.getComponent()
    2. J2EE Component
      ClasspathElement.getComponent
      1. org.eclipse.jst.j2ee.application.internal.operations.ClasspathElement.getComponent(ClasspathElement.java:186)
      1 frame
    3. J2EE Core Component
      ClasspathTableManager$1.checkStateChanged
      1. org.eclipse.jst.j2ee.internal.ClasspathTableManager.availableJARCheckStateChanged(ClasspathTableManager.java:469)
      2. org.eclipse.jst.j2ee.internal.ClasspathTableManager$1.checkStateChanged(ClasspathTableManager.java:450)
      2 frames
    4. JFace
      CheckboxTableViewer$1.run
      1. org.eclipse.jface.viewers.CheckboxTableViewer$1.run(CheckboxTableViewer.java:178)
      1 frame
    5. Eclipse Core
      Platform.run
      1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
      2. org.eclipse.core.runtime.Platform.run(Platform.java:880)
      2 frames
    6. Eclipse UI
      JFaceUtil$1.run
      1. org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
      1 frame
    7. JFace
      OpenStrategy$1.handleEvent
      1. org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
      2. org.eclipse.jface.viewers.CheckboxTableViewer.fireCheckStateChanged(CheckboxTableViewer.java:176)
      3. org.eclipse.jface.viewers.CheckboxTableViewer.handleSelect(CheckboxTableViewer.java:266)
      4. org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1168)
      5. org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:227)
      6. org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:221)
      7. org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:388)
      7 frames
    8. 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:3823)
      4. org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
      4 frames
    9. JFace
      Window.open
      1. org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
      2. org.eclipse.jface.window.Window.open(Window.java:801)
      2 frames
    10. Eclipse UI
      PropertyDialogAction.run
      1. org.eclipse.ui.dialogs.PropertyDialogAction.run(PropertyDialogAction.java:157)
      1 frame
    11. JFace
      ActionContributionItem$5.handleEvent
      1. org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
      2. org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583)
      3. org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500)
      4. org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
      4 frames
    12. 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:3823)
      4. org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
      4 frames
    13. Eclipse UI
      Workbench$5.run
      1. org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
      2. org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
      3. org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
      4. org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
      4 frames
    14. Databinding
      Realm.runWithDefault
      1. org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
      1 frame
    15. Eclipse UI
      Workbench.createAndRunWorkbench
      1. org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
      1 frame
    16. Eclipse UI
      PlatformUI.createAndRunWorkbench
      1. org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
      1 frame
    17. Eclipse IDE
      IDEApplication.start
      1. org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
      1 frame
    18. Equinox Container
      EclipseAppHandle.run
      1. org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
      1 frame
    19. 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:382)
      4. org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
      4 frames
    20. 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
    21. Equinox
      Main.main
      1. org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
      2. org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
      3. org.eclipse.equinox.launcher.Main.run(Main.java:1236)
      4. org.eclipse.equinox.launcher.Main.main(Main.java:1212)
      4 frames