After upgrading SonarQube from 5.1.2 to 5.2 I re-run my analysis from Jenkins with the following error:
14:41:50.804 DEBUG - Download: https://sonar-unstable.devops.hsdg-ad.int/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives&activation=true&qprofile=grvy-sonar-way-00127&p=1&ps=500 (no proxy)
14:41:52.025 DEBUG - Download: https://sonar-unstable.devops.hsdg-ad.int/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives&activation=true&qprofile=java-license-cockpit-88561&p=1&ps=500 (no proxy)
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 8.843s
Final Memory: 20M/965M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:100)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:53)
Caused by: java.lang.IllegalStateException: Fail to execute request [code=500, url=https://sonar-unstable.devops.hsdg-ad.int/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives&activation=true&qprofile=java-license-cockpit-88561&p=1&ps=500]
at org.sonar.batch.bootstrap.ServerClient.handleHttpException(ServerClient.java:138)
Error log of sonarQube:
java.lang.NullPointerException: null
at org.sonarqube.ws.Rules$Active$Param$Builder.setValue(Rules.java:14919) ~[sonar-ws-5.2.jar:na]
at org.sonar.server.rule.ws.ActiveRuleCompleter.buildActiveRuleResponse(ActiveRuleCompleter.java:121) ~[sonar-server-5.2.jar:na]
at org.sonar.server.rule.ws.ActiveRuleCompleter.writeActiveRules(ActiveRuleCompleter.java:101) ~[sonar-server-5.2.jar:na]
at org.sonar.server.rule.ws.ActiveRuleCompleter.writeActiveRules(ActiveRuleCompleter.java:77) ~[sonar-server-5.2.jar:na]
at org.sonar.server.rule.ws.ActiveRuleCompleter.completeSearch(ActiveRuleCompleter.java:63) ~[sonar-server-5.2.jar:na]
at org.sonar.server.rule.ws.SearchAction.doContextResponse(SearchAction.java:369) ~[sonar-server-5.2.jar:na]
at org.sonar.server.rule.ws.SearchAction.buildResponse(SearchAction.java:137) ~[sonar-server-5.2.jar:na]
at org.sonar.server.rule.ws.SearchAction.handle(SearchAction.java:130) ~[sonar-server-5.2.jar:na]
at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:85) ~[sonar-server-5.2.jar:na]
at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_25]
at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_25]
at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:425) [jruby-complete-1.7.9.jar:na]
at org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:292) [jruby-complete-1.7.9.jar:na]
at org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:44) [jruby-complete-1.7.9.jar:na]
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:70) [jruby-complete-1.7.9.jar:na]
at rubyjit.Api::JavaWsController$$index_F0093F46F7B98A69318D6BFF77A0745BB14C850A1085743368.__file__(/u10/app/gcadmin/sonar/unstable/sonarqube-5.2/web/WEB-INF/app/controllers/api/java_ws_controller.rb:34) [jruby-complete-1.7.9.jar:na]
Can it be related to an error before in sonar.log:
java.lang.NullPointerException: null
at org.sonarqube.ws.Rules$Active$Param$Builder.setValue(Rules.java:14919) ~[sonar-ws-5.2.jar:na]
at org.sonar.server.rule.ws.ActiveRuleCompleter.buildActiveRuleResponse(ActiveRuleCompleter.java:121) ~[sonar-server-5.2.jar:na]
at org.sonar.server.rule.ws.ActiveRuleCompleter.writeActiveRules(ActiveRuleCompleter.java:101) ~[sonar-server-5.2.jar:na]
at org.sonar.server.rule.ws.ActiveRuleCompleter.writeActiveRules(ActiveRuleCompleter.java:77) ~[sonar-server-5.2.jar:na]
at org.sonar.server.rule.ws.ActiveRuleCompleter.completeSearch(ActiveRuleCompleter.java:63) ~[sonar-server-5.2.jar:na]
at org.sonar.server.rule.ws.SearchAction.doContextResponse(SearchAction.java:369) ~[sonar-server-5.2.jar:na]
at org.sonar.server.rule.ws.SearchAction.buildResponse(SearchAction.java:137) ~[sonar-server-5.2.jar:na]
at org.sonar.server.rule.ws.SearchAction.handle(SearchAction.java:130) ~[sonar-server-5.2.jar:na]
at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:85) ~[sonar-server-5.2.jar:na]
at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_25]
at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_25]
at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:425) [jruby-complete-1.7.9.jar:na]
at org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:292) [jruby-complete-1.7.9.jar:na]
at org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:44) [jruby-complete-1.7.9.jar:na]
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:70) [jruby-complete-1.7.9.jar:na]
at rubyjit.Api::JavaWsController$$index_F0093F46F7B98A69318D6BFF77A0745BB14C850A1085743368.__file__(/u10/app/gcadmin/sonar/unstable/sonarqube-5.2/web/WEB-INF/app/controllers/api/java_ws_controller.rb:34) [jruby-complete-1.7.9.jar:na]
So, I think the quality profile "Java License Cockpit" is broken: Selecting Rules and this specific Quality profile gives an error. Thus, I removed the quality profile. However, still analysis is not successful:
15:27:48.349 INFO - Load active rules
15:27:48.349 DEBUG - Download: https://sonar-unstable.devops.hsdg-ad.int/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives&activation=true&qprofile=grvy-sonar-way-00127&p=1&ps=500 (no proxy)
15:27:49.350 DEBUG - Download: https://sonar-unstable.devops.hsdg-ad.int/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives&activation=true&qprofile=java-globe-way-with-findbugs-06716&p=1&ps=500 (no proxy)
15:27:50.722 DEBUG - Download: https://sonar-unstable.devops.hsdg-ad.int/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives&activation=true&qprofile=java-globe-way-with-findbugs-06716&p=2&ps=500 (no proxy)
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 9.738s
Final Memory: 20M/965M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:100)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:53)
Caused by: java.lang.IllegalStateException: Fail to execute request [code=500, url=https://sonar-unstable.devops.hsdg-ad.int/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives&activation=true&qprofile=java-globe-way-with-findbugs-06716&p=2&ps=500]
Any idea about the problem?