We have upgraded the Sonarqube version from 9.9 to 10.5, from then we are facing issues with azure d

Hi Team,

Need your help for below issue . we upgraded sonarqube server but it not support from client scanner. Please help us to resolving issue ASAP
upgrading from 9.9.1 to 10.5
System information Operating system :- Redhat
Java version :- 17
Database provider/version :- Mssql 2018 )

  • Facing issue :- azure devops build pipeline we use SonarQube task and
    during SonarQube scanner we getting below Error on azure devops Build agent
[error]ERROR: Error during SonarScanner execution
ERROR: Error during SonarScanner execution
[error]java.lang.UnsupportedClassVersionError: org/sonar/batch/bootstrapper/EnvironmentInformation 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
java.lang.UnsupportedClassVersionError: org/sonar/batch/bootstrapper/EnvironmentInformation 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
[error]at java.base/java.lang.ClassLoader.defineClass1(Native Method)


[error]Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main"
Error: A JNI error has occurred, please check your installation and try again
[error]java.lang.UnsupportedClassVersionError: org/sonarsource/scanner/cli/Main 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


java.lang.IllegalStateException: Unable to load components interface org.sonar.api.batch.sensor.Sensor
ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: Unable to load components interface org.sonar.api.batch.sensor.Sensor

Thanks

Hi,

Welcome to the community!

This guide should help.

 
Ann

i tried a few versions of JDK 17 and java 20 on my windows machine one by one.
openjdk 17.0.11
system-environment-variable JAVA_HOME to the right version,

java 17 agent 7

java.lang.IllegalStateException: Unable to load components interface org.sonar.api.batch.sensor.Sensor
##[error]at org.sonar.core.platform.SpringComponentContainer.getComponentsByType(SpringComponentContainer.java:194)
	at org.sonar.core.platform.SpringComponentContainer.getComponentsByType(SpringComponentContainer.java:194)
##[error]at org.sonar.scanner.bootstrap.AbstractExtensionDictionary.completeScannerExtensions(AbstractExtensionDictionary.java:81)

==

java 17 agent 5

ERROR: Error during SonarScanner execution
##[error]java.lang.IllegalStateException: Unable to load components interface org.sonar.api.batch.sensor.Sensor
java.lang.IllegalStateException: Unable to load components interface org.sonar.api.batch.sensor.Sensor
##[error]at org.sonar.core.platform.SpringComponentContainer.getComponentsByType(SpringComponentContainer.java:194)

java 20 on agent 1

##[error]ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: Unable to load components interface org.sonar.api.batch.sensor.Sensor
ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: Unable to load components interface org.sonar.api.batch.sensor.Sensor
##[error]at org.sonar.core.platform.SpringComponentContainer.getComponentsByType(SpringComponentContainer.java:194)
	at org.sonar.scanner.bootstrap.AbstractExtensionDictionary.completeScannerExtensions(AbstractExtensionDictionary.java:81)
	at org.sonar.core.platform.SpringComponentContainer.getComponentsByType(SpringComponentContainer.java:194)
	at org.sonar.scanner.bootstrap.AbstractExtensionDictionary.completeScannerExtensions(AbstractExtensionDictionary.java:81)
##[error]at org.sonar.scanner.bootstrap.AbstractExtensionDictionary.getExtensions(AbstractExtensionDictionary.java:76)
	at org.sonar.scanner.bootstrap.AbstractExtensionDictionary.getFilteredExtensions(AbstractExtensionDictionary.java:66)
	at org.sonar.scanner.sensor.ModuleSensorExtensionDictionary.selectSensors(ModuleSensorExtensionDictionary.java:46)

Hi,

Would you care to provide the complete stacktrace?

 
Ann

SonarQube scanner :- 5.0.1

02:40:01.126 INFO: EXECUTION FAILURE
[1614]step:5:1615)02:40:01.126 INFO: ------------------------------------------------------------------------
[1615](:5:1616)02:40:01.127 INFO: Total time: 8.416s
[1616](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1617)02:40:01.165 ERROR: Error during SonarScanner execution
[1617](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1618)02:40:01.163 INFO: Final Memory: 12M/48M
[1618](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1619)java.lang.IllegalStateException: Unable to load components interface org.sonar.api.batch.sensor.Sensor
[1619](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1620)02:40:01.165 INFO: ------------------------------------------------------------------------
[1620](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1621)    at org.sonar.core.platform.SpringComponentContainer.getComponentsByType(SpringComponentContainer.java:194)
[1621](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1622)    at org.sonar.scanner.bootstrap.AbstractExtensionDictionary.completeScannerExtensions(AbstractExtensionDictionary.java:81)
[1622](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1623)    at org.sonar.scanner.bootstrap.AbstractExtensionDictionary.getExtensions(AbstractExtensionDictionary.java:76)
[1623](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1624)    at org.sonar.scanner.bootstrap.AbstractExtensionDictionary.getFilteredExtensions(AbstractExtensionDictionary.java:66)
[1624](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1625)    at org.sonar.scanner.sensor.ModuleSensorExtensionDictionary.selectSensors(ModuleSensorExtensionDictionary.java:46)
[1625](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1626)    at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$0(ModuleSensorsExecutor.java:54)
[1626](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1627)    at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:79)
[1627](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1628)    at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:54)
[1628](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1629)    at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:82)
[1629](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1630)    at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
[1630](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1631)    at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
[1631](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1632)    at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:204)
[1632](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1633)    at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:200)
[1633](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1634)    at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:197)
[1634](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1635)    at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:173)
[1635](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1636)    at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
[1636](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1637)    at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
[1637](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1638)    at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:351)
[1638](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1639)    at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
[1639](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1640)    at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
[1640](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1641)    at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:138)
[1641](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1642)    at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
[1642](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1643)    at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
[1643](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1644)    at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:71)
[1644](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1645)    at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:65)
[1645](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1646)    at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
[1646](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1647)    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
[1647](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1648)    at java.base/java.lang.reflect.Method.invoke(Method.java:578)
[1648](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1649)    at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
[1649](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1650)    at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
[1650](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1651)    at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
[1651](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1652)    at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
[1652](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1653)    at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
[1653](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1654)    at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
[1654](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1655)    at org.sonarsource.scanner.cli.Main.main(Main.java:62)
[1655](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1656)Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ClassRealm{cobertura}-org.sonar.plugins.cobertura.CoberturaSensor': Resolution of declared constructors on bean Class [org.sonar.plugins.cobertura.CoberturaSensor] from ClassLoader [ClassRealm{cobertura}] failed; nested exception is java.lang.NoClassDefFoundError: org/sonar/plugins/java/api/JavaResourceLocator
[1656](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1657)    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:318)
[1657](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1658)    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1302)
[1658](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1659)    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1219)
[1659](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1660)    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
[1660](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1661)    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
[1661](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1662)    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
[1662](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1663)    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
[1663](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1664)    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
[1664](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1665)    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
[1665](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1666)    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:673)
[1666](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1667)    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:661)
[1667](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1668)    at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1314)
[1668](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1669)    at org.sonar.core.platform.SpringComponentContainer.getComponentsByType(SpringComponentContainer.java:192)
[1669](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1670) ... 34 more
[1670](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1671)Caused by: java.lang.NoClassDefFoundError: org/sonar/plugins/java/api/JavaResourceLocator
[1671](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1672)    at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
[1672](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1673)    at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3473)
[1673](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1674)    at java.base/java.lang.Class.getDeclaredConstructors(Class.java:2652)
[1674](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1675)    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:313)
[1675](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1676) ... 46 more
[1676](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1677)Caused by: java.lang.ClassNotFoundException: org.sonar.plugins.java.api.JavaResourceLocator
[1677](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1678)    at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39)
[1678](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1679)    at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:97)
[1679](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1680)    at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:86)
[1680](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1681) ... 50 more
[1681](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1682)Exception in thread "Thread-0" java.lang.NoClassDefFoundError: ch/qos/logback/classic/spi/ThrowableProxy
[1682](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1683)    at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:145)
[1683](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1684)    at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:424)
[1684](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1685)    at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:386)
[1685](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1686)    at ch.qos.logback.classic.Logger.error(Logger.java:543)
[1686](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1687)    at org.eclipse.jgit.internal.util.ShutdownHook.cleanup(ShutdownHook.java:87)
[1687](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1688)    at java.base/java.lang.Thread.run(Thread.java:1623)
[1688](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1689)Caused by: java.lang.ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxy
[1689](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1690)    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
[1690](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1691)    at org.sonarsource.scanner.api.internal.IsolatedClassloader.loadClass(IsolatedClassloader.java:82)
[1691](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1692)    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
[1692](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1693) ... 6 more
[1693](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1694)Process returned exit code 1
[1694](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1695)The SonarScanner did not complete successfully
[1695](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1696)02:40:01.256 Post-processing failed. Exit code: 1
[1696](https://github.com/test/actions/runs/9091126745/job/24985124488#step:5:1697)Error: Process completed with exit code 1.

Hi,

Thanks for that:

The problem appears to be the Cobertura plugin. I would tell you to talk to its maintainers, but I’m not sure it’s maintained anymore.

I suggest you uninstall it and try again.

 
HTH,
Ann

Hi Team,

We installed and uninstalled the plugin twice. But the same issue. Cobertura Plugin 2.0.0 supports SonarQube 10.5 and 10.4, but is experiencing the same difficulty.

Are you sure?

The last release would tell me it hasn’t been updated since 7.0.

Just because it can be installed, doesn’t mean it will work.

new error

INFO: ------------------------------------------------------------------------

##[error]Exception in thread “Thread-0” java.lang.NoClassDefFoundError: ch/qos/logback/classic/spi/ThrowableProxy

Exception in thread “Thread-0” java.lang.NoClassDefFoundError: ch/qos/logback/classic/spi/ThrowableProxy

##[error]at ch.qos.logback.classic.spi.LoggingEvent.(LoggingEvent.java:145)

at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:424)

at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:386)

at ch.qos.logback.classic.Logger.error(Logger.java:543)

at org.eclipse.jgit.internal.util.ShutdownHook.cleanup(ShutdownHook.java:87)

at java.base/java.lang.Thread.run(Thread.java:833)

Caused by: java.lang.ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxy

at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)

at org.sonarsource.scanner.api.internal.IsolatedClassloader.loadClass(IsolatedClassloader.java:82)

at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)

… 6 more

at ch.qos.logback.classic.spi.LoggingEvent.(LoggingEvent.java:145)

at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:424)

at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:386)

at ch.qos.logback.classic.Logger.error(Logger.java:543)

at org.eclipse.jgit.internal.util.ShutdownHook.cleanup(ShutdownHook.java:87)

at java.base/java.lang.Thread.run(Thread.java:833)

Caused by: java.lang.ClassNotFoundException: ch.qos.logback.classic.spi.ThrowableProxy

at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)

at org.sonarsource.scanner.api.internal.IsolatedClassloader.loadClass(IsolatedClassloader.java:82)

at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)

… 6 more

The SonarScanner CLI has finished

Hi,

A new error deserves a new thread. With all the details, including the full analysis log.

 
Ann