Failed to execute goal org.sonarsource.scanner.maven-plugin:3.7.0.1746:sonar on project java.lang.unsupportedclassversionclassversionerror:org/sonar/batch/bootstrap/Environment Information has Been complied by amore recent version of the Java Runtime 55.0

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
  • what are you trying to achieve
  • what have you tried so far to achieve this

I have installed Jenkins 2.289.2 and Sonarqube with 9.0.0. and integrated Sonarqube with Jenkins in Jenkins pipeline and openkdk 8 is running in Jenkins and we are getting the below error:

Failed to execute goal org.sonarsource.scanner.maven-plugin:3.7.0.1746:sonar on project java.lang.unsupportedclassversionclassversionerror:org/sonar/batch/bootstrap/Environment Information has Been complied by amore recent version of the Java Runtime 55.0,this version of the Java Runtime only recognise class file version up to 52.0.

We have given the source and target in Jenkins file as Java 1.8 version.
Along we gave to compile using 1.8.

Still we are getting the above error. Can anyone help me resolve this issue. Kindly response as soon as possible people.

Thanks.

Hi @SakthiSushmitha

SonarQube 9.0 requires Java 11 to run scanners:
https://docs.sonarqube.org/latest/analysis/analysis-with-java-11/

Thanks for the reply @Julien_HENRY.

But we were trying to integrate Sonarqube with Jenkins and trying to add the scanner plugin with pipeline stages configuration in Jenkins file. And the Sonarqube and Jenkins is done using Docker installation.

For the source and target for Sonarqube properties given java1.8 in Sonarqube pipeline stage.
Also to compile we tried with 1.8.

Thanks for the reply.

Still can anyone help us for the solution.