glassfishplugins
  1. glassfishplugins
  2. GLASSFISHPLUGINS-357

NPE when GlassFish plugin installed and interacting with other WTP servers

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Eclipse 3.7.2, Mac OS X 10.6

      Description

      When the GlassFish plugin is installed, interacting with any other WTP server (e.g. the one that ships with Eclipse for Tomcat 7, but also the separately installed JBoss Tools one, the Resin one, etc) will result in the following exception:

      java.lang.NullPointerException
      	at com.sun.enterprise.jst.server.sunappsrv.actions.PreludeUpdateCenterAction.accept(PreludeUpdateCenterAction.java:171)
      	at com.sun.enterprise.jst.server.sunappsrv.actions.AppServerContextAction.selectionChanged(AppServerContextAction.java:238)
      	at org.eclipse.ui.actions.SelectionProviderAction.selectionChanged(SelectionProviderAction.java:143)
      	at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:164)
      	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.Viewer.fireSelectionChanged(Viewer.java:162)
      	at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2188)
      	at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1211)
      	at org.eclipse.ui.navigator.CommonViewer.handleSelect(CommonViewer.java:478)
      	at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1241)
      	at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:239)
      	at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:233)
      	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:403)
      	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4128)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
      	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)
      	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3974)
      	at org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask(Display.java:4875)
      	at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5226)
      	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
      	at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:220)
      	at org.eclipse.swt.widgets.Widget.mouseDownSuper(Widget.java:1092)
      	at org.eclipse.swt.widgets.Tree.mouseDownSuper(Tree.java:2052)
      	at org.eclipse.swt.widgets.Widget.mouseDown(Widget.java:1084)
      	at org.eclipse.swt.widgets.Control.mouseDown(Control.java:2528)
      	at org.eclipse.swt.widgets.Tree.mouseDown(Tree.java:2007)
      	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5471)
      	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
      	at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:220)
      	at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:2095)
      	at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2253)
      	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5535)
      	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
      	at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:4989)
      	at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5138)
      	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
      	at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:128)
      	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3610)
      	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: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)
      

      To try to reproduce this, I've installed a completely clean Eclipse 3.7.2, installed only the GlassFish plugin from http://dlc.sun.com.edgesuite.net/glassfish/eclipse/indigo (choose the Java EE 6 docs and the actual WTP adapter, NOT the embedded GlassFish 3.1.2). Then I've created a Tomcat 7 server using the WTP adapter that ships with Eclipse (Apache -> Tomcat v7.0 Server).

      Merely clicking on the resulting "Tomcat v7.0 Server at localhost" in the Servers view immediately caused the above given exception.

      I've validated that the exception is not specific to the Tomcat adapter, by trying the same thing with the adapters from JBoss Tools for JBoss AS and EAP, OpenShift, Resin and even WebLogic from OEPE yield the very same exception. I did notice that occasionally a few more clicks on a server in the Servers view is needed in order to start triggering the exception.

        Activity

        Hide
        arjan tijms added a comment -

        When I install the full OEPE 12.1.1.0.1 from Eclipse Marketplace, which includes Oracle GlassFish Server Tools (which has both version 2.0.1.201201241947 and 4.2.1.201201241947), the problem does not seem to occur.

        The standalone download from the edgesuite.net domain had version: Oracle GlassFish Server Tools 2.0.1.201205030900.

        Show
        arjan tijms added a comment - When I install the full OEPE 12.1.1.0.1 from Eclipse Marketplace, which includes Oracle GlassFish Server Tools (which has both version 2.0.1.201201241947 and 4.2.1.201201241947), the problem does not seem to occur. The standalone download from the edgesuite.net domain had version: Oracle GlassFish Server Tools 2.0.1.201205030900.
        Show
        piotrik added a comment - Fixed. The update can be found on http://download.java.net/glassfish/eclipse/indigo[juno ] update sites. See http://blogs.oracle.com/roller-ui/authoring/preview/piotrik/?previewEntry=glassfish_3_1_2_2 for more info.
        Hide
        arjan tijms added a comment -

        Thanks Piotrik!

        Btw, you posted the link to the blog while still editing I guess Here's the real link: https://blogs.oracle.com/piotrik/entry/glassfish_3_1_2_2

        Show
        arjan tijms added a comment - Thanks Piotrik! Btw, you posted the link to the blog while still editing I guess Here's the real link: https://blogs.oracle.com/piotrik/entry/glassfish_3_1_2_2

          People

          • Assignee:
            Unassigned
            Reporter:
            arjan tijms
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: