Plugin not working for intellij

Hi,
I downloaden SonarLint and am trying to install the plugin in IntelliJ but it doesn’t work.

SonarLint: sonarlint-intellij-4.1.1.3345

IntelliJ IDEA 2018.2.7 (Ultimate Edition)
Build #IU-182.5107.41, built on November 26, 2018JRE: 1.8.0_152-release-1248-b22 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

when I install the plugin and restart intelliJ I get an error:
Plugin ‘org.sonarlint.idea’ failed to initialize and will be disabled. Please restart IntelliJ IDEA.

java.lang.noClassDefFoundError: org/sonarsource/sonarlint/core/client/api/common/LogOutput
at java.lang.ClassLoader.defineClass1(Native Method)

Caused by: java.lang.ClassNotFoundException: org.sonarsource.sonarlint.core.client.api.common.LogOutput.PluginClassLoader[org.sonarlint.idea, 4.1.1.3345]
at com.intellij.ide.plugins.PluginClassLoader@1369f239

Kind regards,
Steven

Hello, thank you for reporting this.

I see 2 different versions of sonarlint-intellij mentioned in your post:

  • 4.0.2.3009 (which you say you have downloaded and are trying to install)
  • 4.1.1.3345 (printed in the error message)

I suggest that you remove the SonarLint plugin entirely, restart IntelliJ, and install the latest version (4.1.1.3345) directly from the marketplace. I just checked that it installs and runs fine on IDEA 2018.2.7.

My bad, I tried both of them and both gave the same error.

Could you please post the full stack trace, as well as the list of plugins?

I am trying to understand what differs on your machine compared to mine (which loads SonarLint 4.1.1 just fine in IDEA 2018.2.7 Ultimate).

plugins.txt (3.4 KB)

Capture1

I am starting to find this issue a bit hard to reproduce.

I tried to do a clean install of IntelliJ IDEA Ultimate 2018.2.7 on a Windows 10 box with the JetBrains 64 bits embedded JVM, to be as close as possible to your setup; and I managed to install, load and run SonarLint for IntelliJ 4.1.1.3345 all fine.

Just to be sure, I also installed the Batch Scripts Support 1.0.7 and Lombok 0.23 2018.2 plugins (the only 2 that differ from the base installation) and still had SonarLint running fine.

I would try the following:

  • Uninstall SonarLint from the “Settings > Plugins” pane in IntelliJ
  • Close the IDE
  • Completely remove the SonarLint folder from %USER_PROFILE%\.IntelliJIdea2018.2\config\plugins
  • Completely remove the sonarlint folder from %USER_PROFILE%\.IntelliJIdea2018.2\config
  • Start your IDE
  • Install SonarLint from the “Settings > Plugins” pane

If all this still does not work and to eliminate a risk of data alteration (e.g by antivirus software or Web proxy), you can try a manual install:

  • Download file SonarLint-4.1.1.3345.zip from the JetBrains Plugins Repository
  • Check file integrity; it should have the following checksums:
    • SHA-256: db7a5b01a8acbd68281d8fc933db1488e2a3931506476b0982ee32c47a95e589
    • SHA-1: 346e73946a4e4d84d81e2fc080bab0314ea27460
    • MD5: 78ed19e0a8e2d602bcb48b5e69e543cc
  • Do a manual install from the “Settings > Plugins” pane, using the “Install plugin from disk…” button

At that point, if you still get this class loading error, I would advise that you update to the latest IntelliJ 2019.2, if possible.

Good luck!

1 Like