We just upgraded to the latest 9.8 version (EE) on acceptance environment.
while trying to run an analysis via azure devops pipeline an user gets the following error:
Error during SonarScanner execution
java.lang.IllegalStateException: Unable to load components interface org.sonar.api.batch.sensor.Sensor
Azure DevOps service connection was set up for acc env. The same Azure Devops organisation is also running analyses in Sonarqube prod environment without problem (on old 8.9 version). So the AzDo org/agent should have sonar scanner already set up.
Am I missing a configuration step or is my previous sonar scanner incompatible with 9.8?
In another azure devops org I tried to set up Sonar analysis in the v9.8 environment and getting the following error:
##[error]No agent found in pool sonarqube-ap which satisfies the specified demands: java, Agent.Version -gtVersion 2.163.1
We have the Sonarqube Extension for Azure DevOps installed in this org. What else needs to be done (on the agent) ?
Can you share your pipeline and your full analysis log?
The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.
##[error]ERROR: Error during SonarScanner execution
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:156)
##[error]at org.sonar.scanner.bootstrap.AbstractExtensionDictionary.completeScannerExtensions(AbstractExtensionDictionary.java:82)
at org.sonar.scanner.bootstrap.AbstractExtensionDictionary.getExtensions(AbstractExtensionDictionary.java:77)
at org.sonar.scanner.bootstrap.AbstractExtensionDictionary.getFilteredExtensions(AbstractExtensionDictionary.java:67)
at org.sonar.scanner.bootstrap.AbstractExtensionDictionary.completeScannerExtensions(AbstractExtensionDictionary.java:82)
at org.sonar.scanner.bootstrap.AbstractExtensionDictionary.getExtensions(AbstractExtensionDictionary.java:77)
##[error]at org.sonar.scanner.sensor.ModuleSensorExtensionDictionary.selectSensors(ModuleSensorExtensionDictionary.java:47)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$0(ModuleSensorsExecutor.java:54)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:79)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:54)
at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:82)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:401)
at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:397)
at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:366)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:135)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
at org.sonar.scanner.sensor.ModuleSensorExtensionDictionary.selectSensors(ModuleSensorExtensionDictionary.java:47)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$0(ModuleSensorsExecutor.java:54)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:79)