Uploaded image for project: 'Spring IDE'
  1. Spring IDE
  2. IDE-935

NullPointerException thrown when unselecting jars in Java EE Module Dependencies

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.1
    • Fix Version/s: None
    • Component/s: ui
    • Labels:
      None
    • Environment:
      Windows and Mac have same problem. Was using STS 1.1.0

      Description

      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)

        Attachments

          Activity

            People

            • Assignee:
              cdupuis Christian Dupuis
              Reporter:
              bcorrie Ben Corrie
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: