The plugin is failing to start in Eclipse after latest update

Hi,

I am using the Snapshot URL update site and after the latest update (1.0.2.v20150811-2117-s) I am getting the following exception when Eclipse starts:

Errors occurred during the build.
Error instantiating builder 'org.eclipse.buildship.core.gradleprojectbuilder'.
Plug-in org.eclipse.buildship.core was unable to load class org.eclipse.buildship.core.configuration.internal.DefaultGradleProjectBuilder.
An error occurred while automatically activating bundle org.eclipse.buildship.core (433).

The plugin is disabled completely and I had to downgrade to a previous version to make it work again.

Thank you for reporting this! I’ll run a installation soon to see what’s going on.

@donat Thanks for your quick response, let me know if you need some logs from me.

We had a problem with the scripts converting Java libraries into Eclipse plug-ins. Now, as the issue seems fixed I’ve created a new snapshot release. Please let us know if it works for you.

Do I need to re-import the projects? Because it’s still failing at start up…

I don’t think a re-import is necessary.
To continue the investigation, can you please check

  • what is the logged stacktrace from the plugin load failure
  • if you have the latest snapshot version installed: 1.0.2.v20150812-2117-s
    You are using Eclipse Mars (4.5), right?

This is the stacktrace:

java.lang.ClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.buildship.core (460).
        at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:116)
        at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:531)
        at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:324)
        at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:327)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:402)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
        at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:573)
        at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
        at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
        at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
        at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
        at org.eclipse.jdt.core.JavaCore.computeClasspathContainerInitializer(JavaCore.java:3345)
        at org.eclipse.jdt.core.JavaCore.getClasspathContainerInitializer(JavaCore.java:3321)
        at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:2849)
        at org.eclipse.jdt.internal.core.JavaModelManager$10.run(JavaModelManager.java:2774)
        at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2241)
        at org.eclipse.jdt.internal.core.JavaModelManager.initializeAllContainers(JavaModelManager.java:2814)
        at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1895)
        at org.eclipse.jdt.core.JavaCore.initializeAfterLoad(JavaCore.java:4067)
        at org.eclipse.jdt.internal.ui.InitializeAfterLoadJob$RealJob.run(InitializeAfterLoadJob.java:36)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.osgi.framework.BundleException: Exception in org.eclipse.buildship.core.CorePlugin.start() of bundle org.eclipse.buildship.core.
        at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:792)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:721)
        at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:941)
        at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:318)
        at org.eclipse.osgi.container.Module.doStart(Module.java:571)
        at org.eclipse.osgi.container.Module.start(Module.java:439)
        at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:454)
        at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
        ... 23 more
Caused by: java.lang.NoClassDefFoundError: com/gradleware/tooling/toolingmodel/repository/ModelRepositoryProvider
        at org.eclipse.buildship.core.CorePlugin.registerServices(CorePlugin.java:115)
        at org.eclipse.buildship.core.CorePlugin.start(CorePlugin.java:95)
        at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:771)
        at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:764)
        ... 30 more
Caused by: java.lang.ClassNotFoundException: com.gradleware.tooling.toolingmodel.repository.ModelRepositoryProvider cannot be found by org.eclipse.buildship.core_1.0.2.v20150812-2117-s
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:439)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
        at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

As you can see I am using 1.0.2.v20150812-2117-s and yes, I’m also using Eclipse Mars

I checked again, and using the latest snapshot on my side resolved the problem. But, it could happen that your environment cached an older version of a 3rd party dependency plugin. To check that:

  1. Open the Host OSGi console: In the Console View you find a menu entry with the tooltip Open Console. Select Host OSGi Console.

  2. Type ss com.gradleware

  3. Compare the result against the content of the snapshot update site: the output should be

    id State Bundle
    523 RESOLVED com.gradleware.tooling.client_0.5.0.v201508121705
    524 RESOLVED com.gradleware.tooling.model_0.5.0.v201508121705
    525 RESOLVED com.gradleware.tooling.utils_0.5.0.v201508121705
    Please validate all plug-ins with the method above. If they match I have to look into the generated update site once again.

This is what I am getting:

id	State       Bundle
396	RESOLVED    com.gradleware.tooling.client_0.5.0.v201508121705
397	RESOLVED    com.gradleware.tooling.model_0.5.0.v201508121705
398	RESOLVED    com.gradleware.tooling.utils_0.5.0.v201508121705

Is this correct? If not, how can I resolve it?

I’ve just found the problem: the eclipse.org signing service deletes mandatory entries from the plug-in manifests (the package exports to be precise)! I think I know why it happens; I will fix it shortly.

If you need a quick solution you can simply clone our GitHub repository and build the latest version locally. It is simple really, you just have to execute ./gradlew build and wait a bit.

OK, now it’s really working for me. The package exports are there, I was able to install the latest version into Eclipse, project import and task execution also works.

Once again, could you please try to update the latest snapshot?

It’s working now, thanks

Excellent news! Thank you for the report and all the feedback.