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 @