Azuredevops gradle sonarqube task scanner or analyze not working with jdk 17

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)

This is running Gradle plugin with sonarqube set to true on ADO (Azure Devops)

UI: SonarQube Version 6.7.1 (build 35068) - LGPL v3 - Community
JVM: 17.0.4 (Private Build 17.0.4+8-Ubuntu-118.04)
Gradle 7.4.1
id “org.sonarqube” version ‘’

INFO: SonarScanner
INFO: Java 11.0.16 Ubuntu (64-bit)
INFO: Linux 5.4.0-1086-azure amd64

> Task :sonarqube
Unable to create symbol table for : 'build/generated-src/'
java.lang.IllegalArgumentException: Unsupported class file major version 61
	at org.objectweb.asm.ClassReader.<init>(
	at org.objectweb.asm.ClassReader.<init>(
	at org.objectweb.asm.ClassReader.<init>(
	at org.sonar.scanner.sensor.SensorWrapper.analyse(
	at org.sonar.scanner.phases.SensorsExecutor.executeSensor(
	at org.sonar.scanner.phases.SensorsExecutor.execute(
	at org.sonar.scanner.phases.SensorsExecutor.execute(
	at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(
  • what are you trying to achieve
  • what have you tried so far to achieve this

setting for Prepare has been

- task: SonarQubePrepare@5
	SonarQube: 'sonarConnection'
	scannerMode: 'Other'
	extraProperties: |

jdk-17 is used by gradle project for its build.

and the gradle build with sonarqube enabled is
    - task: Gradle@2
        gradleWrapperFile: 'gradlew'
        tasks: 'build'
        publishJUnitResults: false
        javaHomeOption: 'Path'
        jdkDirectory: '/usr/lib/jvm/java-17-openjdk-amd64/'
        gradleOptions: '-Xmx3072m'
        sonarQubeRunAnalysis: true
        sqGradlePluginVersionChoice: 'build'
        spotBugsAnalysis: false
      displayName: Gradle Build & Publish Test Results	  

The build part goes fine.
but when the sonarqube task is run, it throws error

Task :sonarqube
Unable to create symbol table for : ‘build/generated-src/’
java.lang.IllegalArgumentException: Unsupported class file major version 61
at org.objectweb.asm.ClassReader.(
at org.objectweb.asm.ClassReader.(

As this is Gradle , I cannot run the Analyzer part separately (- task: SonarQubeAnalyze@5)

I even tried to set the below in SonarQubePrepare - extaProperties.

But get the same Error as above.

Please advise.

Note: Java | SonarQube Docs Java | SonarQube Docs

The references above say one doesn’t need to set these if one is using Maven/Gradle
and since I am using Gradle those really doesn’t need to be set.


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:

6.7.1 → 7.9.6 → 8.9.9 → 9.6 (last step optional)

You may find the Upgrade Guide and the LTS-to-LTS Upgrade Notes helpful. If you have questions about upgrading, feel free to open a new thread for that here.

If your error persists after upgrade, please come back to us.

Thanks for your quick reply.
So you are saying the server version 6.7.1 doesn’t support java-17 version ?
upto what version does it support. ?
Is there any wiki page which list which version of sonarqube server supports what version.



Java 8

There is not – but you can trust that Java 17 is only supported in the latest supported version of SonarQube (v9.6)