After SonarQube 5.2 upgrade java analysis fails with java.lang.IllegalArgumentException: There's no changeset on line

半世苍凉 提交于 2019-12-11 00:09:21

问题


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 ?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/33755226/after-sonarqube-5-2-upgrade-java-analysis-fails-with-java-lang-illegalargumentex

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!