0

All our new projects using SonarQube Runner plugin from teamcity are succeeding (teamcity build log shows the analysis is successful and published results to Sonar), but the "Background task" for the above is failing in Sonar with a below exception, so no information is available in Sonar. We recently upgrade from SonarQube 4.x version to 5.3. So, current spec are..

SonarQube 5.3. SonarRunner 2.4. Java Gradle project with two sub modules. SonarQube is running with jre - 1.8.0_11 (64-bit).

<Update: It worked when I used a new database (in memory H2) instead of the existing database. If so, how can the database be cleaned or any idea how to resolve this issue?>

2016.02.22 16:25:05 ERROR [o.s.s.c.t.CeWorkerCallableImpl] Failed to execute task XXXX
java.lang.NullPointerException: null
    at org.sonar.server.computation.step.LoadDebtModelStep.toCharacteristic(LoadDebtModelStep.java:81) ~[sonar-server-5.3.jar:na]
    at org.sonar.server.computation.step.LoadDebtModelStep.feedDebtModel(LoadDebtModelStep.java:73) ~[sonar-server-5.3.jar:na]
    at org.sonar.server.computation.step.LoadDebtModelStep.execute(LoadDebtModelStep.java:57) ~[sonar-server-5.3.jar:na]
    at org.sonar.server.computation.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:39) ~[sonar-server-5.3.jar:na]
    at org.sonar.server.computation.taskprocessor.report.ReportTaskProcessor.process(ReportTaskProcessor.java:72) ~[sonar-server-5.3.jar:na]
    at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.executeTask(CeWorkerCallableImpl.java:81) [sonar-server-5.3.jar:na]
    at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.call(CeWorkerCallableImpl.java:56) [sonar-server-5.3.jar:na]
    at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.call(CeWorkerCallableImpl.java:35) [sonar-server-5.3.jar:na]
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) [na:1.7.0_15]
    at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.7.0_15]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [na:1.7.0_15]
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) [na:1.7.0_15]
    at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.7.0_15]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) [na:1.7.0_15]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [na:1.7.0_15]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.7.0_15]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.7.0_15]
    at java.lang.Thread.run(Unknown Source) [na:1.7.0_15]

<Update: List of Plugins on SonarQube 4.5.6 (before upgrade): (printing the list from extensions/plugins directory)

<ol>
    <li>sonar-csharp-plugin-4.4.jar</li>
    <li>sonar-csharp-stylecop-plugin-2.1.jar</li>
    <li>sonar-dotnet-fxcop-plugin-2.1.jar</li>
    <li>sonar-dotnet-gallio-plugin-2.1.jar</li>
    <li>sonar-dotnet-gendarme-plugin-2.1.jar</li>
    <li>sonar-dotnet-ndeps-plugin-2.1.jar</li>
    <li>sonar-dotnet-plugin-2.1.jar</li>
    <li>sonar-findbugs-plugin-2.1.jar</li>
    <li>sonar-jacoco-plugin-2.1.jar</li>
    <li>sonar-java-plugin-2.1.jar</li>
    <li>sonar-scm-activity-plugin-1.7.jar</li>
    <li>sonar-scm-stats-plugin-0.3.1.jar</li>
    <li>sonar-squid-java-plugin-2.1.jar</li>
    <li>sonar-surefire-plugin-2.1.jar</li>
</ol>

List of Plugins on SonarQube 5.3 (after)

<ol>
    <li>sonar-csharp-plugin-4.5.jar</li>
    <li>sonar-java-plugin-3.7.1.jar</li>
    <li>sonar-javascript-plugin-2.10.jar</li>
    <li>sonar-scm-git-plugin-1.1.jar</li>
    <li>sonar-scm-svn-plugin-1.2.jar</li>
    <li>sonar-web-plugin-2.4.jar</li>
</ol>

Any idea what is the issue? This is definitely terrible.

endless
  • 3,316
  • 4
  • 26
  • 33
  • 1
    While upgrading, did you check your list of plugins against the [compatibility matrix](http://docs.sonarqube.org/display/PLUG/Plugin+Version+Matrix) ? Please edit your question with plugins (and version) installed on server. – Nicolas B. Mar 07 '16 at 07:50
  • As @n_stan mentions, we can't help you without having the full list of plugins along with their version. – Fabrice - SonarSource Team Mar 07 '16 at 10:50
  • Thanks. I added the list of plugins before and after. Anything else? As I go through the documentation, I am seeing that Technical Debt plugin has undergone some changes and integrated into SonarQube, while SQALE rating has become a commercial plugin etc. In that context, could that be the reason? – endless Mar 07 '16 at 18:29
  • 1
    Your Java Plugin v3.7.1 is [not compatible](http://docs.sonarqube.org/display/PLUG/Java+Plugin) with SonarQube 5.3, please upgrade to v3.11 and let us know if you still have the same error. – Nicolas B. Mar 08 '16 at 15:16
  • @n_stan thanks. I will try. But somebody has another Sonar 5.2 instance and they have Java 3.6 plugin and it works fine! Also, like I mentioned in my original post, it works fine if I point to a brand new database, it doesn't work with the old database that we used with Sonar 4.5 instance. – endless Mar 08 '16 at 16:08
  • I tried with 3.11 plugin, same error. I am a corporate user and I am upset with the speed of response, i believe we have license. Can @Fabrice-SonarSourceTeam post your contact info so I can send a private email? Thanks. – endless Mar 09 '16 at 03:42
  • For commercial support, please head to http://www.sonarsource.com/get-contact/ – Fabrice - SonarSource Team Mar 09 '16 at 07:42

0 Answers0