SonarLint Analysis fails on IntelliJ 2019.2 with Java 11 runtime

After upgrading to IntelliJ 2019.2 the SonarLint analysis in the IDE fails.
When using the IntelliJ version with a bundled Java 11 (“JBR11”) runtime (since 2019.2 the default version) on Mac OS X the analysis fails, while using the version with the Java 8 runtime works.

Default version: 2019.2 for Mac OS X
Java 8 version: 2019.2 for macOS with bundled JBR 8 (dmg)

SonarLint version:
SonarQube version (connected mode): Community Edition Version 7.2.1 (build 14109)

An excerpt from the log:

Java Main Files AST scan
1 source files to be analyzed
Unable to create symbol table for : /Users/ralf/yes/platform/platform-rp-service/src/main/java/com/yes/platform/rp/access/
java.lang.IllegalArgumentException: Unsupported class file major version 55
	at org.objectweb.asm.ClassReader.<init>(
	at org.objectweb.asm.ClassReader.<init>(
	at org.objectweb.asm.ClassReader.<init>(
	at org.sonarsource.sonarlint.core.analyzer.sensor.SensorsExecutor.executeSensor(
	at org.sonarsource.sonarlint.core.analyzer.sensor.SensorsExecutor.execute(
	at org.sonarsource.sonarlint.core.container.analysis.AnalysisContainer.doAfterStart(
	at org.sonarsource.sonarlint.core.container.ComponentContainer.startComponents(
	at org.sonarsource.sonarlint.core.container.ComponentContainer.execute(
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.lambda$analyze$0(
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.withReadLock(
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.withReadLock(
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.analyze(
	at org.sonarlint.intellij.core.ConnectedSonarLintFacade.analyze(
	at org.sonarlint.intellij.core.SonarLintFacade.startAnalysis(
	at org.sonarlint.intellij.analysis.SonarLintAnalyzer.analyzeModule(
	at org.sonarlint.intellij.analysis.SonarLintTask.analyze(
	at org.sonarlint.intellij.analysis.SonarLintJobManager.lambda$runTask$1(
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(
	at org.sonarlint.intellij.analysis.SonarLintJobManager.lambda$runTask$2(
	at java.base/java.util.concurrent.Executors$
	at java.base/
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.base/java.util.concurrent.ThreadPoolExecutor$
	at java.base/

1/1 source files have been analyzed
Java Main Files AST scan (done) | time=8ms
Java Test Files AST scan
0 source files to be analyzed
0/0 source files have been analyzed
Java Test Files AST scan (done) | time=1ms

One more information: The project in IntelliJ is configured to be built with Java 8 and uses a Java 8 runtime. (Project SDK & project language level)

Here is the error log and the plugins configuration:
error.txt (65.4 KB) plugins.txt (5.3 KB)

Hello @Ralf_Wagner, thank you for you feedback.

As far as I understand, the plugin used by SonarLint to analyze Java code fails to load the bytecode for one of your classes, due to it being compiled for Java 11 (major version 55). This looks strange to me since you mention that the project is configured with Java 8 language level and target. There might be a Java-11-built .class file hiding somewhere on your class path.

I notice in plugins.txt that the Java plugin served by your SonarQube instance has version 5.6 (build 15032), whereas the first version known to support Java 11 is 5.8 (build 15699), and the latest released version is 5.14 (build 18788).

My advice here is to upgrade your SonarQube server - FYI SonarQube 7.9.1 LTS has just been released - or at the very least update your server’s plugins. And as mentioned above, you might also want to double check that the project’s class path (including build output directory) is clean.

1 Like

@JBL_SonarSource Thanks for your quick reply.

I’ll check the class path again, but I already did so (and a colleague has the same problem).
We’re currently still using Java 8 for development purposes, so there should be no Java 11 compiler or runtime yet involved. Using the IntelliJ version that has Java 11 included seemed to be ok, as it is only used by IntelliJ internally.

Concerning the plugins: Our Sonar server does not offer the update any newer ones (I recently updated the plugins and checked again today), especially not the update of the plugin version supporting Java 11. I suppose this is due to the fact that the Sonar server version we’re currently using does not support newer plugins, or do I miss something here?

We’d definitely like to upgrade to the current version, but as this requires migrating the database from MySQL to most probably Postgress, this will take some time.

Thanks for your help and Sonar as a great tool.

This is a well known limitation of our Java analyzer. It is using the IDE runtime JRE to resolve JDK classes, while in a perfect world it should be using the JRE configured to compile the project.

For now your only option is to upgrade SonarJava to a more recent version, and it might indeed require to also upgrade your server. Or stop using connected mode…