Spring Tool Suite
  1. Spring Tool Suite
  2. STS-1239

Grails: in-place plugin dependencies that are not packaged throw exception in Project Explorer

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Complete
    • Affects Version/s: 2.5.0.M3
    • Fix Version/s: 2.5.0.RC1
    • Component/s: GRAILS
    • Labels:
      None

      Description

      Following these steps:

      • In STS workspace, with Grails perspective active:
      • create a Grails plugin project gpp
      • create a Grails project gp
      • in gp, open the BuildConfig.groovy file under "Config" folder
      • add gpp as an in-place plugin dependency to gp (cut/paste the following line in the last line of gp's BuildConfig.groovy file):

      grails.plugin.location.gpp= "../gpp"

      • Save file and right click on gp and run context action: Grails -> Refresh Dependencies
      • Once refresh is completed, expand gp project in the Project Explorer.
      • expand the "plugins" folder

      "gpp" appears as a dependency element under "plugins" but an exception is thrown. See stack trace below.

      Work around:
      If gp is closed, and gpp is packaged by opening the Grails command prompt on gpp project and running the "package" command,
      and gp is then opened again and "plugins" expanded, gpp appears again without exception.

      Possible solution:
      To deal with this issue, either don't show the content of gpp in the gp "plugins" folder if it doesn't have a plugin.xml file, OR open a dialogue informing
      the user that gpp needs to be packaged first. Alternately, extract plugin information from the plugin groovy file as opposed to the plugin.xml file.

      java.io.FileNotFoundException: C:\workspaces\runtime_sts_36_2\workspacegrailspluginprojectdependency\plugin.xml (The system cannot find the file specified)
      at java.io.FileInputStream.open(Native Method)
      at java.io.FileInputStream.<init>(FileInputStream.java:106)
      at java.io.FileInputStream.<init>(FileInputStream.java:66)
      at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
      at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
      at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:653)
      at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:186)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:772)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
      at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
      at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:235)
      at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
      at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:180)
      at com.springsource.sts.grails.core.internal.classpath.PluginParser.parse(PluginParser.java:64)
      at com.springsource.sts.grails.core.internal.plugins.PerProjectPluginCache.initializePluginData(PerProjectPluginCache.java:67)
      at com.springsource.sts.grails.core.internal.plugins.PerProjectPluginCache.setProject(PerProjectPluginCache.java:105)
      at com.springsource.sts.grails.core.internal.plugins.GrailsCore.connect(GrailsCore.java:121)
      at com.springsource.sts.grails.explorer.elements.GrailsDependencyPluginFolder.getPluginData(GrailsDependencyPluginFolder.java:94)
      at com.springsource.sts.grails.explorer.elements.GrailsDependencyPluginFolder.exists(GrailsDependencyPluginFolder.java:106)
      at com.springsource.sts.grails.explorer.elements.GrailsPluginFolder.getChildren(GrailsPluginFolder.java:81)
      at com.springsource.sts.grails.explorer.providers.GrailsNavigatorContentProvider.getChildren(GrailsNavigatorContentProvider.java:113)
      at org.eclipse.ui.internal.navigator.extensions.SafeDelegateTreeContentProvider.getChildren(SafeDelegateTreeContentProvider.java:96)
      at org.eclipse.ui.internal.navigator.extensions.SafeDelegateTreeContentProvider.getChildren(SafeDelegateTreeContentProvider.java:275)
      at org.eclipse.ui.internal.navigator.extensions.SafeDelegateTreeContentProvider.getChildren(SafeDelegateTreeContentProvider.java:94)
      at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider$1.run(NavigatorContentServiceContentProvider.java:150)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.internalGetChildren(NavigatorContentServiceContentProvider.java:137)
      at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.getChildren(NavigatorContentServiceContentProvider.java:123)
      at org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren(AbstractTreeViewer.java:1348)
      at org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeViewer.java:391)
      at org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren(StructuredViewer.java:896)
      at org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildren(AbstractTreeViewer.java:601)
      at org.eclipse.jface.viewers.AbstractTreeViewer$1.run(AbstractTreeViewer.java:799)
      at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
      at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:778)
      at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:644)
      at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:749)
      at org.eclipse.jface.viewers.AbstractTreeViewer.handleTreeExpand(AbstractTreeViewer.java:1444)
      at org.eclipse.jface.viewers.TreeViewer.handleTreeExpand(TreeViewer.java:952)
      at org.eclipse.jface.viewers.AbstractTreeViewer$4.treeExpanded(AbstractTreeViewer.java:1455)
      at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:132)
      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.Widget.sendEvent(Widget.java:1077)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
      at org.eclipse.swt.widgets.Tree.wmNotifyChild(Tree.java:7408)
      at org.eclipse.swt.widgets.Control.wmNotify(Control.java:5096)
      at org.eclipse.swt.widgets.Composite.wmNotify(Composite.java:1887)
      at org.eclipse.swt.widgets.Control.WM_NOTIFY(Control.java:4726)
      at org.eclipse.swt.widgets.Control.windowProc(Control.java:4215)
      at org.eclipse.swt.widgets.Display.windowProc(Display.java:4873)
      at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)
      at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2362)
      at org.eclipse.swt.widgets.Tree.callWindowProc(Tree.java:1536)
      at org.eclipse.swt.widgets.Tree.WM_LBUTTONDOWN(Tree.java:6303)
      at org.eclipse.swt.widgets.Control.windowProc(Control.java:4195)
      at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:5844)
      at org.eclipse.swt.widgets.Display.windowProc(Display.java:4886)
      at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
      at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2459)
      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3655)
      at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629)
      at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
      at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
      at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)
      at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
      at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
      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:369)
      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:619)
      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
      at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
      at org.eclipse.equinox.launcher.Main.main(Main.java:1383)

        Activity

        Hide
        Andrew Eisenberg (c) added a comment -

        No longer a problem since we are now showing in place plugin dependencies as project dependencies.

        Show
        Andrew Eisenberg (c) added a comment - No longer a problem since we are now showing in place plugin dependencies as project dependencies.

          People

          • Assignee:
            Unassigned
            Reporter:
            Nieraj Singh
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              First Response Date: