Unsupported class file major version 64

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
  • SonarQube: Version 9.4 (build 54424)
  • Maven Scanner plugin dependency in the pom.xml of my src code:

  • Java Code compiled in JDK 20 (Maven 3.5)
  • Sonarqube JDK (11, 17)
  • how is SonarQube deployed: zip
  • what are you trying to achieve
  • Code scanning using Sonar-scanner & getting the above error
  • what have you tried so far to achieve this
  • I’ve tried compiling the code in JDK 20 as well as scanning using JDK 20/17/11 for sonar-scanner, still facing the same error.
  • When I try to compile the code in JDK 17, & scan using JDK 17 for sonar-scanner, then it works like a charm & I’m able to publish the report to our org dashboard.

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

This is super old. The latest version of sonar-plugin-api is v9.17.

Are you actually using the sonar-plugin-api in your application? You do not need it to execute the SonarQube scanner.

And, SonarQube v9.4 is an EOL SonarQube version. You need to update to at least SonarQube v9.9 LTS.

Hi Colin,

Sorry if there is a misinformation leading to the confusion. I meant this plugin from maven repository:
which is the latest in that repository.

Yes, we have planned to upgrade to SQ v9.9 LTS by the end of this month probably, but just in case if I could get a confirmation, if this upgrade resolves my issue?

That is from April 2015… and to be clear would only be used if you are building SonarQube plugins. If you just want to run a SonarQube scan, you only need the sonar-maven-plugin referenced. Check the documentation on the SonarScanner for Maven.

To be honest, I’m not exactly sure in what context the error is being thrown (during compilation, durin g analysis…) so it would be great if you could provide some full logs related to the error.

And, SonarQube v9.4 has been EOL since SonarQube v9.5 coming out. We ask users to be using a supported version of SonarQube before trying to troubleshoot issues.

Thank you for your input.
We have planned our SQ upgrade to v9.9 LTS by next week. I’d be obliged if we can keep this ticket open until then.

I’ll check the settings & plugin configurations on the upgraded version & will update here.
Meanwhile, i’ll re-run the plan & fetch logs, will try to post it here in a text file for more clarification.

Edit: I found this in my pipeline logs:
— sonar-maven-plugin: (default-cli)
So I’m using the latest plugin

Not a ticket. It’s a post on a community forum. :slight_smile: But sure.