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.
Ehm… well maybe to some degree. If you’ve had success analyzing code written to Java 16, then that’s great but there is a possibility that parsing may choke (and therefore analysis fail for the file) on features introduced in later language versions.