Sonar 8.2 support for Java 17

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    Sonar qube 8.2 and Java 17
  • what are you trying to achieve
    generate report
  • what have you tried so far to achieve this

Post upgrade to Java 17 , we are getting the below error using Sonar qube . we need to upgrade to which 9.x to have support for Java 17 , Pls help provide details

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin: (default-cli) on project microservice-xxxxx-management: Unable to load component class org.sonar.plugins.javascript.JavaScri`Preformatted text`
ptSensor: ExceptionInInitializerError: java.lang.reflect.InaccessibleObjectException-->Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,
throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @50f9da17 -> [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]


Hey there.

You’re right – you do need to upgrade to SonarQube v9.x (the latest version is v9.8) for Java 17 support! Your upgrade path is:

8.2 → 8.9.10 → 9.8

You may find the Upgrade Guide and the LTS-to-LTS Upgrade Notes helpful. If you have questions about upgrading, feel free to open a new thread for that here.

Thanks Colin

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.