Error in SonarQube scan

Ok, thanks. In my case, I’m using Jenkins to build my Java project, then hand it off to SonarQube for analysis. SonarQube is then throwing the same org/sonar/batch/bootstrapper/EnvironmentInformation has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 error.

Hi @JFrench ,

The error indicates just as Ann mentioned in the earlier thread.

What version of SonarQube are you using?

You can use Java 8 to build your sources however to execute analysis with SonarQube 9.X you need to run it with Java 11. This can be done by either making sure that the builds run with Java 11 by default e.g. by making Java 11 the default version on your self-hosted agent or by setting/overriding the JAVA_HOME environment variable in the pipeline right before the analysis is run as we document here.

Joe

Thank you. That’s what I did: I configured Jenkins to have both Java 8 and 11, then edited the Jenkins build pipelines to use Java 8.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.