eclipsegroovylaunching

NoClassDefFoundError: org/codehaus/jdt/groovy/integration/LanguageSupport after launching Eclipse


I get these exceptions when opening Groovy files:

org.osgi.framework.BundleException: Exception in org.codehaus.groovy.eclipse.refactoring.Activator.start() of bundle org.codehaus.groovy.eclipse.refactoring.
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
...
Caused by: java.lang.NoClassDefFoundError: org/codehaus/jdt/groovy/integration/LanguageSupport

or

java.lang.NoClassDefFoundError: org/codehaus/groovy/eclipse/refactoring/formatter/GroovyIndentationService
    at org.codehaus.groovy.eclipse.editor.GroovyAutoIndentStrategy.<init>(GroovyAutoIndentStrategy.java:50)
    at org.codehaus.groovy.eclipse.editor.GroovyConfiguration.getAutoEditStrategies(GroovyConfiguration.java:181)
...
Caused by: org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle org.codehaus.groovy.eclipse.refactoring (47).
...
Caused by: org.osgi.framework.BundleException: Exception in org.codehaus.groovy.eclipse.refactoring.Activator.start() of bundle org.codehaus.groovy.eclipse.refactoring.
...
Caused by: java.lang.NoClassDefFoundError: org/codehaus/jdt/groovy/integration/LanguageSupport
Caused by: java.lang.ClassNotFoundException: org.codehaus.jdt.groovy.integration.LanguageSupport

Solution

  • Groovy needs a special version of the org.eclipse.jdt.core plugin.

    For 3.7, the original plugin has the version 3.7.3.v2012... but you need 3.7.3.xx-2013*

    If you start Eclipse via an "Eclipse Application" launch config, open it in the "Run Configurations" dialog. In the "Plug-ins" tab, search for "jdt.core" and activate the correct plugin.

    If it's not there, remove and install the Groovy feature again.