CircleCi build failure because of the below sonar issue:

Template for a good new topic, formatted with Markdown:

  • ALM used (GitHub, Bitbucket Cloud, Azure DevOps) : Github
  • CI system used (Bitbucket Cloud, Azure DevOps, Travis CI, Circle CI : Circle CI
  • Languages of the repository : java
  • Error observed (wrap logs/code around with triple quotes ``` for proper formatting)

INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 2.829s
INFO: Final Memory: 8M/30M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: The plugin [java] does not support Java 11.0.11
at org.sonar.core.platform.PluginLoader.instantiatePluginClasses(PluginLoader.java:123)
at org.sonar.core.platform.PluginLoader.load(PluginLoader.java:54)
at org.sonar.scanner.bootstrap.ScannerPluginRepository.start(ScannerPluginRepository.java:62)
org.eclipse.jgit.errors.MissingObjectException: Missing blob 9153a82e48249e18bb1b97d435b50de55d0a9db8
at org.sonar.scm.git.blame.FileBlamer.waitForTasks(FileBlamer.java:238)

Caused by: java.lang.UnsupportedClassVersionError: org/sonar/plugins/java/JavaPlugin 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

at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:72)
at org.sonar.core.platform.PluginLoader.instantiatePluginClasses(PluginLoader.java:121)
... 26 more

ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.


Getting above error while running Sonar cloud in CCI , looks like this is caused by due to blobless clone done by CCI checkout , Can i have inputs in it please.

2 Likes

I have the same issue

ERROR: Error during SonarScanner execution

java.lang.IllegalStateException: The plugin [java] does not support Java 11.0.3

at org.sonar.core.platform.PluginLoader.instantiatePluginClasses(PluginLoader.java:123)

at org.sonar.core.platform.PluginLoader.load(PluginLoader.java:54)

at org.sonar.scanner.bootstrap.ScannerPluginRepository.start(ScannerPluginRepository.java:62)

Hey there.

It looks like there are two issues – one related to a blobless clone, and the other the version of Java you’re using.

For the blobless clone, checkout this thread:

For this error:

java.lang.IllegalStateException: The plugin [java] does not support Java 11.0.11

Read about the Scanner Environment requirements for SonarCloud, specifically that you need to use Java 17 to execute analysis.

We did upgraded Java 17, but still getting same error.

There must still be something going on. Can you hare your CircleCI build config?