Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.9.0.RELEASE
    • Fix Version/s: 2.9.2.RELEASE, 3.0.0.M1
    • Component/s: GRAILS
    • Labels:
      None
    • Environment:

      Windows XP

      Description

      I have a Grails application v1.3.6 in my STS 2.9.0 workspace and when I right-click on the project and select Grails Tools > Grails Plugin Manager. A quick window saying "Resolving list of available plugins" displays for a brief second and then closes. The plugin manager never launches and there is no output in the Console indicating that it tried to get a list of plugins.

        Activity

        Hide
        Kris De Volder (c) added a comment -

        Are there any error in the Eclipse error log?

        Show
        Kris De Volder (c) added a comment - Are there any error in the Eclipse error log?
        Hide
        Scott Doyle added a comment -

        !ENTRY org.eclipse.ui 4 0 2012-03-08 14:46:39.650
        !MESSAGE Unhandled event loop exception
        !STACK 0
        java.lang.NullPointerException
        at com.springsource.sts.frameworks.ui.internal.plugins.PluginManagerDialog.restoreOriginalState(PluginManagerDialog.java:1069)
        at com.springsource.sts.frameworks.ui.internal.plugins.PluginManagerDialog.setViewerInput(PluginManagerDialog.java:1240)
        at com.springsource.sts.frameworks.ui.internal.plugins.PluginManagerDialog.resynchPluginsList(PluginManagerDialog.java:816)
        at com.springsource.sts.frameworks.ui.internal.plugins.PluginManagerDialog.createCommandArea(PluginManagerDialog.java:306)
        at com.springsource.sts.frameworks.ui.internal.plugins.CommandDialog.createDialogArea(CommandDialog.java:68)
        at org.eclipse.jface.dialogs.TitleAreaDialog.createContents(TitleAreaDialog.java:155)
        at org.eclipse.jface.window.Window.create(Window.java:431)
        at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
        at org.eclipse.jface.window.Window.open(Window.java:790)
        at com.springsource.sts.grails.ui.internal.actions.OpenGrailsPluginsManagerActionDelegate.run(OpenGrailsPluginsManagerActionDelegate.java:54)
        at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
        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.Widget.sendEvent(Widget.java:1053)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
        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)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

        Show
        Scott Doyle added a comment - !ENTRY org.eclipse.ui 4 0 2012-03-08 14:46:39.650 !MESSAGE Unhandled event loop exception !STACK 0 java.lang.NullPointerException at com.springsource.sts.frameworks.ui.internal.plugins.PluginManagerDialog.restoreOriginalState(PluginManagerDialog.java:1069) at com.springsource.sts.frameworks.ui.internal.plugins.PluginManagerDialog.setViewerInput(PluginManagerDialog.java:1240) at com.springsource.sts.frameworks.ui.internal.plugins.PluginManagerDialog.resynchPluginsList(PluginManagerDialog.java:816) at com.springsource.sts.frameworks.ui.internal.plugins.PluginManagerDialog.createCommandArea(PluginManagerDialog.java:306) at com.springsource.sts.frameworks.ui.internal.plugins.CommandDialog.createDialogArea(CommandDialog.java:68) at org.eclipse.jface.dialogs.TitleAreaDialog.createContents(TitleAreaDialog.java:155) at org.eclipse.jface.window.Window.create(Window.java:431) at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089) at org.eclipse.jface.window.Window.open(Window.java:790) at com.springsource.sts.grails.ui.internal.actions.OpenGrailsPluginsManagerActionDelegate.run(OpenGrailsPluginsManagerActionDelegate.java:54) at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251) 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.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754) 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) at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
        Hide
        Kris De Volder (c) added a comment -

        Assigning to Nieraj. NPE is in code he wrote.

        Show
        Kris De Volder (c) added a comment - Assigning to Nieraj. NPE is in code he wrote.
        Hide
        Nieraj Singh (c) added a comment -

        Unfortunately, I am not able to reproduce this error. Is this issue reproducible every time the Grails Plugin Manager is launched, or does it occur only on certain occasions? Thanks.

        Show
        Nieraj Singh (c) added a comment - Unfortunately, I am not able to reproduce this error. Is this issue reproducible every time the Grails Plugin Manager is launched, or does it occur only on certain occasions? Thanks.
        Hide
        Scott Doyle added a comment -

        It happens every time I try to launch it. Could it be possible that it is having issues with being behind a proxy server. I have the proxy server configuration set up in Window > Preferences > General > Network Connections. I also set the proxy in Grails. Is the Plugin Manager checking for and using proxy server settings?

        Show
        Scott Doyle added a comment - It happens every time I try to launch it. Could it be possible that it is having issues with being behind a proxy server. I have the proxy server configuration set up in Window > Preferences > General > Network Connections. I also set the proxy in Grails. Is the Plugin Manager checking for and using proxy server settings?
        Hide
        Scott Doyle added a comment -

        If I execute the list-plugins command from the Grails Command Prompt I am able to get a listing of plugins without a problem.

        Show
        Scott Doyle added a comment - If I execute the list-plugins command from the Grails Command Prompt I am able to get a listing of plugins without a problem.
        Hide
        Kris De Volder (c) added a comment -

        I just ran into this bug while testing for Grails 1.3.8. Nieraj helped debug it.
        We discovered that it is a bug which rarely occurs. It is triggered by duplicate entries in the downloaded list of plugins.

        Once you hit the problem, it will keep re-occurring for you because you will have a cached copy of the plugin list file on your disk. So even if the list changes later on on the server and other people may not be seeing the problem, the unlucky guy who has a cached copy with duplicates... will have a problem.

        Refreshing the list of plugins may make the problem go away (assuming the list has been fixed on the server).
        since you can't actually open the plugin manager. You may need to manually delete the plugin list files from your .grails folder to clear out the file.

        I am now adding some code to fix the problem (i.e. so STS handles the duplicate entries better).

        Show
        Kris De Volder (c) added a comment - I just ran into this bug while testing for Grails 1.3.8. Nieraj helped debug it. We discovered that it is a bug which rarely occurs. It is triggered by duplicate entries in the downloaded list of plugins. Once you hit the problem, it will keep re-occurring for you because you will have a cached copy of the plugin list file on your disk. So even if the list changes later on on the server and other people may not be seeing the problem, the unlucky guy who has a cached copy with duplicates... will have a problem. Refreshing the list of plugins may make the problem go away (assuming the list has been fixed on the server). since you can't actually open the plugin manager. You may need to manually delete the plugin list files from your .grails folder to clear out the file. I am now adding some code to fix the problem (i.e. so STS handles the duplicate entries better).
        Hide
        Kris De Volder (c) added a comment -

        Closing: Fix is committed.

        Show
        Kris De Volder (c) added a comment - Closing: Fix is committed.
        Hide
        Scott Doyle added a comment -

        Thanks for finding this Kris. I am very busy on a project right now. Can you tell me where the list is cached under .grails so I don't have to delete the entire contents under .grails?

        Show
        Scott Doyle added a comment - Thanks for finding this Kris. I am very busy on a project right now. Can you tell me where the list is cached under .grails so I don't have to delete the entire contents under .grails?
        Hide
        Kris De Volder (c) added a comment -

        For me, when using Grails 2.0.1 the files are here:
        /home/kdvolder/.grails/2.0.1/plugins-list-grailsCentral.xml
        /home/kdvolder/.grails/2.0.1/plugins-list-grailsCore.xml

        I'm not 100% sure about this, but I think if you run a grails command "grails list-plugins" on the command line or with the Grails command prompt in STS, it should also refresh the file contents. You may need to refresh-dependencies and/or restart STS after modifying/deleting the files since there's also an in-memory cache of the list.

        Kris

        Show
        Kris De Volder (c) added a comment - For me, when using Grails 2.0.1 the files are here: /home/kdvolder/.grails/2.0.1/plugins-list-grailsCentral.xml /home/kdvolder/.grails/2.0.1/plugins-list-grailsCore.xml I'm not 100% sure about this, but I think if you run a grails command "grails list-plugins" on the command line or with the Grails command prompt in STS, it should also refresh the file contents. You may need to refresh-dependencies and/or restart STS after modifying/deleting the files since there's also an in-memory cache of the list. Kris
        Hide
        Scott Doyle added a comment -

        I just reinstalled STS 2.9.1 and am having the same problem. I implemented your suggestion by deleting the files :

        /.grails/2.0.3/plugins-list-grailsCentral.xml
        .grails/2.0.3/plugins-list-grailsCore.xml

        I also restarted STS. When I try to launch the Plugin Manager I see that it is executing the list-plugin command and lists the available plugins, but the Plugin Manager will not display.

        Show
        Scott Doyle added a comment - I just reinstalled STS 2.9.1 and am having the same problem. I implemented your suggestion by deleting the files : /.grails/2.0.3/plugins-list-grailsCentral.xml .grails/2.0.3/plugins-list-grailsCore.xml I also restarted STS. When I try to launch the Plugin Manager I see that it is executing the list-plugin command and lists the available plugins, but the Plugin Manager will not display.
        Hide
        Kris De Volder (c) added a comment -

        Hi Scott,

        The tell-tale sign whether you are hitting this bug is the NPE in the error log...
        See the comment a little higher for the actual stacktrace:
        https://issuetracker.springsource.com/browse/STS-2490?focusedCommentId=55950&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-55950

        The workarounds may not work, the assumption for it working is that after you delete files and refresh them, their contents will no longer trigger the bug. But that assumes the files have actually changed on the servers and now have a contents that doesn't trigger the bug.

        Most people I've heard from recently who had this problem have updated to a nightly build to fix the problem.

        See here on the forum for other comments about the same problem, and what people did to fix it:
        http://forum.springsource.org/showthread.php?125058-STS-2-9-1-Grails-Plugin-Manager-does-not-open&p=408460

        Let me know if you need more help with this.

        Kris

        Show
        Kris De Volder (c) added a comment - Hi Scott, The tell-tale sign whether you are hitting this bug is the NPE in the error log... See the comment a little higher for the actual stacktrace: https://issuetracker.springsource.com/browse/STS-2490?focusedCommentId=55950&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-55950 The workarounds may not work, the assumption for it working is that after you delete files and refresh them, their contents will no longer trigger the bug. But that assumes the files have actually changed on the servers and now have a contents that doesn't trigger the bug. Most people I've heard from recently who had this problem have updated to a nightly build to fix the problem. See here on the forum for other comments about the same problem, and what people did to fix it: http://forum.springsource.org/showthread.php?125058-STS-2-9-1-Grails-Plugin-Manager-does-not-open&p=408460 Let me know if you need more help with this. Kris
        Hide
        Scott Doyle added a comment -

        Kris,

        I see that you have this marked as resolved for version 3.0 and not 2.9.2. My problem is I want to package the tool up to distribute to a large number of workstations but could never get approval to build a package based on nightly builds and cannot distribute 2.9.1 with this bug since is it a common method for developers to add plugins.

        When is 3.0 projected to be released? If it is soon I can try to hold off on building the package.

        Thanks,
        Scott

        Show
        Scott Doyle added a comment - Kris, I see that you have this marked as resolved for version 3.0 and not 2.9.2. My problem is I want to package the tool up to distribute to a large number of workstations but could never get approval to build a package based on nightly builds and cannot distribute 2.9.1 with this bug since is it a common method for developers to add plugins. When is 3.0 projected to be released? If it is soon I can try to hold off on building the package. Thanks, Scott
        Hide
        Scott Doyle added a comment -

        By the way I ran into this same problem on my laptop at home so it seems to be a common problem.

        Show
        Scott Doyle added a comment - By the way I ran into this same problem on my laptop at home so it seems to be a common problem.
        Hide
        Martin Lippert (c) added a comment -

        STS 3.0 is expected to ship in July 2012.
        STS 2.9.2 is expected to ship end of May 2012.
        Do you need this in 2.9.2?

        Show
        Martin Lippert (c) added a comment - STS 3.0 is expected to ship in July 2012. STS 2.9.2 is expected to ship end of May 2012. Do you need this in 2.9.2?
        Hide
        Martin Lippert (c) added a comment -

        Kris, in case we cherry-pick this for 2.9.2, is this the correct commit hash for the fix:
        24d51785e543c3eb95c6c744529339236dcb308d

        Show
        Martin Lippert (c) added a comment - Kris, in case we cherry-pick this for 2.9.2, is this the correct commit hash for the fix: 24d51785e543c3eb95c6c744529339236dcb308d
        Hide
        Kris De Volder (c) added a comment -

        Correct, that is the fix. It is a very small change so backporting to 2.9.2 should be easy.

        Scott is probably right. The conditions for this bug used to be rare, but from traffic on this bug and the forum, it seems that conditions that trigger it somehow are occurring much more frequently these days. Since it is quite an annoying problem I think it would be good to cherry pick for 2.9.2. I'll do this today.

        Kris

        Show
        Kris De Volder (c) added a comment - Correct, that is the fix. It is a very small change so backporting to 2.9.2 should be easy. Scott is probably right. The conditions for this bug used to be rare, but from traffic on this bug and the forum, it seems that conditions that trigger it somehow are occurring much more frequently these days. Since it is quite an annoying problem I think it would be good to cherry pick for 2.9.2. I'll do this today. Kris
        Hide
        Kris De Volder (c) added a comment -

        I've cherrypicked the fix on the 2.9.x branch.

        Show
        Kris De Volder (c) added a comment - I've cherrypicked the fix on the 2.9.x branch.

          People

          • Assignee:
            Kris De Volder (c)
            Reporter:
            Scott Doyle
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              First Response Date: