Sonarqube and Azure Devops > Error creating bean with name

I have sonarqube-, Trying to scan Android Java application via Azure Pipeline.
Projects build.gradle has necessary information

sonarqube {
properties {
property(“sonar.projectKey”, “XXXXXXXXXX”)
property(“sonar.token”, “XXXXXXXXXX”)
property(“sonar.projectName”, “XXXXXXXXX”)
property(“”, “XXXXXXXXX”)



When the command fired on terminal ./gradlew sonar It scans code successfully.

Now in pipeline - All three steps are placed -

when the gradle command is added-


This gets interpreted on Azure command as “SonarQube” Parameter. while sonar expect “Sonar” as parameter. and it fails. Later when replaced everything with PowerShell command. as below .


This works but when replaced with below command, it again fails.

This task fails with below error. Can some one guess, what could be wrong and is this correct way to scan java gradle based projects ?

Note - URL mentioned in below error is live and downloads the rules file via protobuf. Project is configured for default rules. Both Azure agent and sonar server on same machine. and everything is updated to latest.

Error creating bean with name ‘’: Unsatisfied dependency expressed through constructor parameter 7; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘’: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘ActiveRules’ defined in org.sonar.scanner.rule.ActiveRulesProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.rule.internal.DefaultActiveRules]: Factory method ‘provide’ threw exception; nested exception is java.lang.IllegalStateException: Fail to request url:,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYhEtkJ-KbPFOk-Fv97_&ps=500&p=1

Hey there.

To start – both gradle sonar and gradel sonarqube should still be supported (albeit with a warning).

  • What version of the Scanner for Gradle is declared in your Gradle file?
  • What is the error you receive when you tick sonarQuberRunAnalysis in the Azure task?

I have below version in my gradle file.

id “org.sonarqube” version “”
I updated to “” and tested same error is popping again and again.

with Azure task, I always get - Error creating bean with name ‘org.sonarsource.scanner.api.internal.IsolatedClassloade