2
votes

This is an analysis that I have been running for a while. The SCM is Git.

I upgraded SonarQube to 5.2 (from http://downloads.sourceforge.net/project/sonar-pkg/deb as I am using Ubuntu LTS 14.04.3)

sonar.log now gives:

2015.11.17 10:43:00 ERROR web[o.s.s.c.t.CeWorkerRunnableImpl] Executed task | project=energy:energy | id=AVEVClvzTc_W2Q8I5ipV | time=647ms

Through the web interface I tracked down:

http://localhost:9000/api/ce/logs?taskId=AVEVClvzTc_W2Q8I5ipV

which gave:

java.lang.IllegalArgumentException: There's no changeset on line 170
    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:125) ~[guava-17.0.jar:na]
    at org.sonar.server.computation.scm.ScmInfoImpl.getChangesetForLine(ScmInfoImpl.java:64) ~[sonar-server-5.2.jar:na]
    at org.sonar.server.computation.scm.ReportScmInfo.getChangesetForLine(ReportScmInfo.java:71) ~[sonar-server-5.2.jar:na]
    at org.sonar.server.computation.step.NewCoverageMeasuresStep$NewCoverageCounter.initialize(NewCoverageMeasuresStep.java:391) ~[sonar-server-5.2.jar:na]

(It would be an improvement if the error message told you the file name in which it thinks line 170 is wrong.)

Is there anything to be done other than wait for version 5.3 ?

2
Hi, are you using sonar.scm.disabled=false ? If yes, you're encountering this ticket : jira.sonarsource.com/browse/SONAR-6897Julien L. - SonarSource Team
No, I am using the default maven plugin (2.6) configuration, ie no configuration.Tim Pizey
Upgrading maven plugin to 2.7.1 did not fix.Tim Pizey
I changed all line ends to Unix, to no effect:find * -type f -name '*.java' -exec dos2unix '{}' \;Tim Pizey
Could you give me the list of installed plugins ?Julien L. - SonarSource Team

2 Answers

1
votes

I had the same problem for the Java plugin. I solved it by executing an analysis with SCM support disabled:

sonar.scm.disabled = true

Note that I didn't have to disable it permanently, only for one analysis. After that it worked fine again.

0
votes

I had the same error but the problem turned out to be the javascript plugin. I was running the latest version (2.8) installed through the update centre. After removing the plugin, the analysis succeeded but now I have no metrics on the Javascript code, which is roughly have the project code base.

Incidentally, the maven sonar plugin (2.7.1) reports "ANALYSIS SUCCESSFUL" even though the analysis actually failed.

EDIT: I noticed a new version (2.9) of the Javascript plugin. Analysis succeeded after the upgrade.