Java version for SonarScanner vs. SonarQube server version?

I have 2 SonarQube servers:
old server: SonarQube Community Edition Version 7.6 (build 21501)
new server: * Developer Edition Version 9.1 (build 47736)

My Jenkins jobs use Java 8 and the old jobs for the old SQ server work ok, but new jobs for the new SQ server are getting the UnsupportedClassVersionError error

15:18:41 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

Same Jenkins both servers, has SonarQube Scanner plugin 2.13.1.
All using SonarQube scanner

Seems clear that we need to move to Java 11 at least for the SonarScanner stage of the build.
I am just trying to understand why the jenkins builds for the old SonarQube server still work but jenkins builds (same jenkins server) for the new SQ server get the UnsupportedClassVersionError error.

Does the version of scanner run on jenkins depend on the remote SonarQube server?

Sorry, I guess the answer is there in front of me in the log files from ‘sonar-scanner -X’:

old/working on Java 8:

DEBUG: Download to /home/jenkins/.sonar/cache/_tmp/fileCache3131174964753019422.tmp

new/UnsupportedClassVersionError error on Java 8:

DEBUG: Download to /home/jenkins/.sonar/cache/_tmp/fileCache7505328857628905196.tmp

1 Like

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