Run Code analysis error - java.lang.UnsupportedClassVersionError

Hi all,

Decided to bite the bullet and upgrade from a version old version of SQ (7) to the latest using the below ARM template onto Azure.

Which sets up an azure website using container SONARQUBE:latest

Site is running and set up correctly, I have my PAT tokens and my SQ tokens correct. I get a failure on the Run Code Analysis task in devops pipelines with

##[error]java.lang.UnsupportedClassVersionError: 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

Its not clear to be how to specify Java 8 52.0 in my app serivce? or is this done in the sonarqube website?

S

Hi,

Welcome to the community!

This error is indeed about an incompatibility between the version of Java used to compile the app you’re running and the version you’re trying to run with. In this case, you’re running with Java 8, and Java 11 is required.

For getting Azure to use the correct version, this SO question may be helpful.

 
Ann

For posterity the resolution was to install older versions of Java (8, 52.0) on our build machines.