Build fails after 10.6 upgrade

Upgraded to 10.6, the website is working fine
SonarScanner is not working

When we run the sonarscanner in the build we get.

18:31:42 [INFO] — sonar-maven-plugin:4.0.0.4121:sonar (default-cli) @ ALPS —
18:31:43 [INFO] 18:31:43.297 Java 11.0.14.1 Eclipse Adoptium (64-bit)
18:31:43 [INFO] 18:31:43.298 Windows Server 2019 10.0 (amd64)
18:31:47 [INFO] 18:31:46.878 User cache: C:\Users\jenkins.sonar\cache
18:31:51 [INFO] 18:31:50.937 Communicating with SonarQube Server 10.6.0.92116
18:31:51 [INFO] 18:31:51.019 Default locale: “en_US”, source code encoding: “UTF-8”
18:31:51 [INFO] ------------------------------------------------------------------------
18:31:51 [INFO] BUILD FAILURE
18:31:51 [INFO] ------------------------------------------------------------------------
18:31:51 [INFO] Total time: 14.306 s
18:31:51 [INFO] Finished at: 2024-09-17T18:31:51-04:00
18:31:51 [INFO] ------------------------------------------------------------------------
18:31:51 [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:4.0.0.4121:sonar (default-cli) on project ALPS: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:4.0.0.4121:sonar failed: An API incompatibility was encountered while executing org.sonarsource.scanner.maven:sonar-maven-plugin:4.0.0.4121:sonar: java.lang.UnsupportedClassVersionError: org/sonar/batch/bootstrapper/EnvironmentInformation has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

This solved our issue.

If you already have a compatible java version installed, please add either the parameter “/d:sonar.scanner.skipJreProvisioning=true” or “/d:sonar.scanner.javaExePath=”.

1 Like

Hi,

I’m glad you worked through this and thanks for following up with your solution. To be clear, you kicked analysis off with a standard mvn sonar:sonar?

 
Thx,
Ann