I have a pipeline, trying to scan android java project.
Sonar Server is 10.0.0.68432 CE
Scanner task in pipeline is
Version : 5.15.0
Pipeline code
Command gets translated as
D:\DAgent_work\4\s\gradlew.bat build sonarqube"
Warning flashed as
Task :sonarqube
Task ‘sonarqube’ is deprecated. Use ‘sonar’ instead.
and exception gets as
* What went wrong:
Execution failed for task ':sonarqube'.
> Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@709da13c-org.sonar.scanner.report.ReportPublisher': Unsatisfied dependency expressed through constructor parameter 7; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@709da13c-org.sonar.scanner.report.ActiveRulesPublisher': 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: http://10.0.0.212:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYhEtkJ-KbPFOk-Fv97_&ps=500&p=1
Observation is -
Url is available and does respond to rules. Azure Agent and sonar is on same server.
http://10.0.0.212:9000/api/rules/search.protobuf
Can any one guess what could be error ?
But on same machine via command prompt If I fire
D:\DAgent_work\4\s>.\gradlew sonar
It works well.