Search code examples
eclipseeclipse-pluginsonarlintsonarlint-eclipse

How to resolve missing required bundle for SonarLint eclipse


I am having a problem loading SonarLint 2.2.0 in my Eclipse Luna. The official web document says that 2.2.0 version is supported for Eclipse Luna. I also can install SonarLint from Eclipse Marketplace without any problem. But on eclipse restart, SonarLint cannot load. Diagnosing the plugin, I found that there are some missing bundles as shown in image below. enter image description here

While checking the bundle from OSGI console, I had the bundle and it was in ACTIVE status but of different version as shown below. enter image description here

Looking at this, I don't think I should downgrade equinox to version 0.0.0 if there's any. And not sure how can I deal with it. Any help would be appreciated guys.

Thanks


Solution

  • Version 2.2.0 of SonarLint for Eclipse moved to Java 8 (as well as the library SonarLint Core). As a consequence, the MANIFEST of all those bundle was updated to require JavaSE-1.8 execution environment.

    If your Eclipse installation is not able to provide this requirement, the SonarLint plugin will not be loaded. I agree this silent failure is a shame, but if you have an idea on how to improve, let me know.

    Possible reasons why your Eclipse doesn't provide JavaSE-1.8:

    • Eclipse was started with Java < 8. To be sure simply open Help -> About Eclipse -> Installation details -> Configuration and look for property java.version. Here the solution is simple: run Eclipse with a JVM 1.8+.
    • You are using a very old Eclipse version (< Kepler SR1). There is no Java 1.8 profile so it will not work even if you use a JVM 1.8 (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=387699). Luna is supposed to be supported, but if you upgraded from an older version of Eclipse if may be broken (see How do I add execution environment 1.8 to Eclipse Luna?). Try with a fresh installation of Luna or a more recent version.