java.lang.UnsupportedClassVersionError: org/sonar/batch/bootstrapper/EnvironmentInformation has been

Sonarqube version - 9.1.1
java version of project 1.8

below are the commands
mvn --quiet clean install jacoco:prepare-agent jacoco:report
mvn org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar -Dsonar.projectKey=xxx -Dsonar.host.url=$SONAR_URL -Dsonar.login=$SONAR_PROJECT_KEY -Dsonar.java.binaries=src/main/resources

have tries with -Dsonar.java.jdkHome=/usr/lib/jvm/java-8-openjdk-amd64 -Dsonar.java.source=1.8 as mentioned in doc , that too not working

even tried setting java_home to 11 before running the sonar analysis and reverting after it

Hi,

Welcome to the community!

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:

9.1.1 → 9.9.2 → 10.2.1 (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.

Regarding the error you’re seeing, this guide should help.

 
Ann