Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.0-beta-5
-
Component/s: None
-
Labels:None
-
Environment:Sun J2SDK 1.4.2, Eclipse 3.0M7
-
Number of attachments :
Description
While running the plugin under Eclipse 3.0M7, I get the following exception. This exception happens when I try to run the test-suite, create a new Groovy class, or open the editor on a groovy file.
The error prevents the groovy editor from being shown.
Stack trace (from GroovyPluginTestCase.testNatureAddAndRemove)
org.osgi.framework.BundleException: The BundleActivator org.codehaus.groovy.eclipse.GroovyPlugin is invalid
at org.eclipse.osgi.framework.internal.core.Bundle.loadBundleActivator(Bundle.java:176)
at org.eclipse.osgi.framework.internal.core.BundleContext.start(BundleContext.java:987)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:403)
at org.eclipse.osgi.framework.internal.core.Bundle.start(Bundle.java:312)
at org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLocalClass(EclipseClassLoader.java:58)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:326)
at org.eclipse.osgi.framework.internal.core.BundleLoader.requireClass(BundleLoader.java:291)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findRequiredClass(BundleLoader.java:915)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:352)
at org.eclipse.osgi.framework.adaptor.BundleClassLoader.loadClass(BundleClassLoader.java:115)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.getConstructor(Unknown Source)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.createTest(RemoteTestRunner.java:500)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.getTest(RemoteTestRunner.java:342)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:387)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:294)
at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:30)
at org.eclipse.pde.internal.junit.runtime.UITestApplication$1.run(UITestApplication.java:91)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:102)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:2325)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2033)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1550)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1526)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:265)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:139)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:47)
at org.eclipse.pde.internal.junit.runtime.UITestApplication.run(UITestApplication.java:34)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:257)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.basicRun(Main.java:279)
at org.eclipse.core.launcher.Main.run(Main.java:742)
at org.eclipse.core.launcher.Main.main(Main.java:581)
java.lang.InstantiationException: org.codehaus.groovy.eclipse.GroovyPlugin
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.eclipse.osgi.framework.internal.core.Bundle.loadBundleActivator(Bundle.java:170)
at org.eclipse.osgi.framework.internal.core.BundleContext.start(BundleContext.java:987)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:403)
at org.eclipse.osgi.framework.internal.core.Bundle.start(Bundle.java:312)
at org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLocalClass(EclipseClassLoader.java:58)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:326)
at org.eclipse.osgi.framework.internal.core.BundleLoader.requireClass(BundleLoader.java:291)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findRequiredClass(BundleLoader.java:915)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:352)
at org.eclipse.osgi.framework.adaptor.BundleClassLoader.loadClass(BundleClassLoader.java:115)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.getConstructor(Unknown Source)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.createTest(RemoteTestRunner.java:500)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.getTest(RemoteTestRunner.java:342)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:387)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:294)
at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:30)
at org.eclipse.pde.internal.junit.runtime.UITestApplication$1.run(UITestApplication.java:91)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:102)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:2325)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2033)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1550)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1526)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:265)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:139)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:47)
at org.eclipse.pde.internal.junit.runtime.UITestApplication.run(UITestApplication.java:34)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:257)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.basicRun(Main.java:279)
at org.eclipse.core.launcher.Main.run(Main.java:742)
at org.eclipse.core.launcher.Main.main(Main.java:581)
Issue Links
- is depended upon by
-
GROOVY-203
Missing plugin dependencies
-
I got a little further: Seems like the root of this exception is an InstansiationException in org.eclipse.osgi.framework.internal.core.Bundle.loadBundleActivator. This method tries to instansiate org.codehaus.groovy.eclipse.GroovyPlugin with a default constructor (which it does not have). Implementing the constructor helps:
public GroovyPlugin() {
{ resourceBundle = ResourceBundle.getBundle("org.codehaus.groovy.eclipse.TestNatureAndBuilderPluginResources"); }super();
plugin = this;
try
catch (MissingResourceException x)
{ resourceBundle = null; }}
However, now the plugin simply does nothing. Three tests still fail, the other 7 succeed:
testRunGroovyMainWithArgs(org.codehaus.groovy.eclipse.test.GroovyModelTestCase)
org.eclipse.core.runtime.CoreException[0]: java.io.IOException
at org.eclipse.core.internal.boot.PlatformURLConnection.setResolvedURL(PlatformURLConnection.java:321)
at org.eclipse.core.internal.boot.PlatformURLHandler.openConnection(PlatformURLHandler.java:64)
at org.eclipse.osgi.framework.internal.protocol.URLStreamHandlerProxy.openConnection(URLStreamHandlerProxy.java:113)
at java.net.URL.openConnection(Unknown Source)
at org.eclipse.core.internal.runtime.InternalPlatform.asActualURL(InternalPlatform.java:235)
at org.eclipse.core.internal.runtime.InternalPlatform.asLocalURL(InternalPlatform.java:215)
at org.eclipse.core.runtime.Platform.asLocalURL(Platform.java:250)
at org.codehaus.groovy.eclipse.launchers.GroovyRunner.computeClasspath(GroovyRunner.java:80)
at org.codehaus.groovy.eclipse.launchers.GroovyRunner.run(GroovyRunner.java:54)
at org.codehaus.groovy.eclipse.model.GroovyProject.runGroovyMain(GroovyProject.java:215)
at org.codehaus.groovy.eclipse.model.GroovyProject.runGroovyMain(GroovyProject.java:205)
at org.codehaus.groovy.eclipse.model.GroovyModel.runGroovyMain(GroovyModel.java:71)
at org.codehaus.groovy.eclipse.test.GroovyModelTestCase.testRunGroovyMainWithArgs(GroovyModelTestCase.java:74)
testRunGroovyMainWithArgsBySpecifyingProjectAndClassName(org.codehaus.groovy.eclipse.test.GroovyModelTestCase)
org.eclipse.core.runtime.CoreException[0]: java.io.IOException
at org.eclipse.core.internal.boot.PlatformURLConnection.setResolvedURL(PlatformURLConnection.java:321)
at org.eclipse.core.internal.boot.PlatformURLHandler.openConnection(PlatformURLHandler.java:64)
at org.eclipse.osgi.framework.internal.protocol.URLStreamHandlerProxy.openConnection(URLStreamHandlerProxy.java:113)
at java.net.URL.openConnection(Unknown Source)
at org.eclipse.core.internal.runtime.InternalPlatform.asActualURL(InternalPlatform.java:235)
at org.eclipse.core.internal.runtime.InternalPlatform.asLocalURL(InternalPlatform.java:215)
at org.eclipse.core.runtime.Platform.asLocalURL(Platform.java:250)
at org.codehaus.groovy.eclipse.launchers.GroovyRunner.computeClasspath(GroovyRunner.java:80)
at org.codehaus.groovy.eclipse.launchers.GroovyRunner.run(GroovyRunner.java:54)
at org.codehaus.groovy.eclipse.model.GroovyProject.runGroovyMain(GroovyProject.java:215)
at org.codehaus.groovy.eclipse.model.GroovyProject.runGroovyMain(GroovyProject.java:229)
at org.codehaus.groovy.eclipse.model.GroovyModel.runGroovyMain(GroovyModel.java:50)
at org.codehaus.groovy.eclipse.test.GroovyModelTestCase.testRunGroovyMainWithArgsBySpecifyingProjectAndClassName(GroovyModelTestCase.java:90)
testASTContentProvider(org.codehaus.groovy.eclipse.test.GroovyContentOutlineTestCase)
junit.framework.AssertionFailedError: expected:<6> but was:<19>