Sonarqube issues when running codepipline

Hello Team,

We are facing a sonarqube issue when we are running a application code with AWS codepipeline with correto17(java jdk17) in .yml file and we have updated code pipeline image to “aws/codebuild/standard:7.0” which is compatible to correto17(java jdk17)

And in our pipeline .yml file below 2 commands are mentioned to run the sonarqube and it was failed at below commands
- mvn sonar:sonar -Dsonar.login=$SONAR_LOGIN -Dsonar.host.url=$SONAR_HOST
- mvn jacoco:prepare-agent test jacoco:report

Error which we are facing in codepipline console:-
Error_
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar (default-cli) on project authorize: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar failed: An API incompatibility was encountered while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar: java.lang.ExceptionInInitializerError: null

[ERROR] Number of foreign imports: 1
2934 [ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
2935 [ERROR]
2936 [ERROR] -----------------------------------------------------
2937 [ERROR] : 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 @

Hey there.

As requested in the template post, what version of SonarQube are you using?

sonarqube 6.7.6

Hi,

Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

6.7.6 → 7.9.6 → 8.9.10 → 9.9 → 10.0 (last step optional)

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

If your error persists after upgrade, please come back to us.