Error: LinkageError occurred while loading main class

Must-share information (formatted with Markdown):

  • I am using version 10.2 of Sonarqube
  • how is SonarQube deployed: zip
  • what are you trying to achieve: I am trying to scan a github repository through jenkins
  • what have you tried so far to achieve this

I am seeing this error: Error: LinkageError occurred while loading main class org.sonarsource.scanner.cli.Main
java.lang.UnsupportedClassVersionError: org/sonarsource/scanner/cli/Main has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

I am confused becasue I am using version 17 of java, as well as version 10.2 of Sonarqube, but I continue to get this error and I am not sure how to troubleshoot it. Any help would be greatly appreciated!!

Hey there.

  • What version of the SonarQube scanner are you using?
  • What version do you get if you run java -version in your Jenkins pipeline?