Maven Sonar Scanner not working with JDK 16

Dears,

I’m running sonar maven scanner using Jenkins declarative pipeline.
I have the following tools:

  • SonarQube 8.4.1
  • SonarQube maven scanner 3.8.0.2131
  • Java: OpenJdk 16

Maven build fails and I get the following error:

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.8.0.2131:sonar (default-cli) on project XXX: Unable to load component class org.sonar.plugins.javascript.JavaScriptSensor: ExceptionInInitializerError: java.lang.reflect.InaccessibleObjectException–>Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not “opens java.lang” to unnamed module @29ad3ac5 → [Help 1]

Do you have any idea on haw to resolve this issue.

Thank you in advance.
Best Regards.

Hi,

We simply don’t support analyzing with JDK 16 yet. As noted in the docs, we support Java 11 for analysis.

 
Ann

Well, this means i cannot run my IDE with SonarLint with Java 16 since lint plugin uses Sonar internally :\

HI @Endeavour,

Welcome to the community!

In fact, I wouldn’t be so sure about that. It’s probably worth creating a new topic in the SonarLint category to verify.

 
Ann

Hi @ganncamp

That you very much for your feedback.

Best Regards.
Wael