在使用以下插件在 Sonarqube 5.3 上运行分析时,我们面临以下问题:
- Java 3.9
- 查找错误 3.3
- Checkstyle 2.4
- PMD 2.5
- SQALE 2.7
- SVN 1.2
- LDAP 1.5.1
- JIRA 1.2
- Cobertura 1.6.3
服务器端的批处理失败并显示以下堆栈跟踪:
2016.02.15 13:42:03 ERROR [o.s.s.c.t.CeWorkerCallableImpl] Failed to execute task AVLlKjxm0XDI7xkdRnLC
org.sonar.server.computation.component.VisitException: Visit failed for Component {key=com.mycompany:myapp:src/main/java/com/mycompany/app/TransferRule.java,type=FILE} located com.mycompany:myapp:src/main/java/com/bnpparibas/app(type=DIRECTORY)->com.mycompany:myapp(type=MODULE)->com.mycompany:myapp(type=PROJECT)
at org.sonar.server.computation.component.VisitException.rethrowOrWrap(VisitException.java:44) ~[sonar-server-5.3.jar:na]
at org.sonar.server.computation.component.PathAwareCrawler.visit(PathAwareCrawler.java:52) ~[sonar-server-5.3.jar:na]
at org.sonar.server.computation.component.PathAwareCrawler.visitChildren(PathAwareCrawler.java:87) ~[sonar-server-5.3.jar:na]
at org.sonar.server.computation.component.PathAwareCrawler.visitImpl(PathAwareCrawler.java:70) ~[sonar-server-5.3.jar:na]
at org.sonar.server.computation.component.PathAwareCrawler.visit(PathAwareCrawler.java:50) ~[sonar-server-5.3.jar:na]
at org.sonar.server.computation.component.PathAwareCrawler.visitChildren(PathAwareCrawler.java:87) ~[sonar-server-5.3.jar:na]
at org.sonar.server.computation.component.PathAwareCrawler.visitImpl(PathAwareCrawler.java:70) ~[sonar-server-5.3.jar:na]
at org.sonar.server.computation.component.PathAwareCrawler.visit(PathAwareCrawler.java:50) ~[sonar-server-5.3.jar:na]
at org.sonar.server.computation.component.PathAwareCrawler.visitChildren(PathAwareCrawler.java:87) ~[sonar-server-5.3.jar:na]
at org.sonar.server.computation.component.PathAwareCrawler.visitImpl(PathAwareCrawler.java:70) ~[sonar-server-5.3.jar:na]
at org.sonar.server.computation.component.PathAwareCrawler.visit(PathAwareCrawler.java:50) ~[sonar-server-5.3.jar:na]
at org.sonar.server.computation.step.NewCoverageMeasuresStep.execute(NewCoverageMeasuresStep.java:113) ~[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(FutureTask.java:334) [na:1.7.0_21]
at java.util.concurrent.FutureTask.run(FutureTask.java:166) [na:1.7.0_21]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_21]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [na:1.7.0_21]
at java.util.concurrent.FutureTask.run(FutureTask.java:166) [na:1.7.0_21]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_21]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [na:1.7.0_21]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_21]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_21]
at java.lang.Thread.run(Thread.java:722) [na:1.7.0_21]
Caused by: java.lang.IllegalArgumentException: There's no changeset on line 32
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.3.jar:na]
at org.sonar.server.computation.scm.DbScmInfo.getChangesetForLine(DbScmInfo.java:69) ~[sonar-server-5.3.jar:na]
at org.sonar.server.computation.step.NewCoverageMeasuresStep$NewCoverageCounter.initialize(NewCoverageMeasuresStep.java:391) ~[sonar-server-5.3.jar:na]
at org.sonar.server.computation.formula.FormulaExecutorComponentVisitor.processLeaf(FormulaExecutorComponentVisitor.java:165) ~[sonar-server-5.3.jar:na]
at org.sonar.server.computation.formula.FormulaExecutorComponentVisitor.process(FormulaExecutorComponentVisitor.java:142) ~[sonar-server-5.3.jar:na]
at org.sonar.server.computation.formula.FormulaExecutorComponentVisitor.visitFile(FormulaExecutorComponentVisitor.java:122) ~[sonar-server-5.3.jar:na]
at org.sonar.server.computation.component.PathAwareCrawler.visitNode(PathAwareCrawler.java:105) ~[sonar-server-5.3.jar:na]
at org.sonar.server.computation.component.PathAwareCrawler.visitImpl(PathAwareCrawler.java:73) ~[sonar-server-5.3.jar:na]
at org.sonar.server.computation.component.PathAwareCrawler.visit(PathAwareCrawler.java:50) ~[sonar-server-5.3.jar:na]
... 25 common frames omitted
在运行扫描仪之前,我们已经使用 Maven 目标构建了项目cobertura:cobertura
如果我们在没有覆盖的情况下构建项目,我们不会遇到这个问题,但我们会丢失覆盖信息。
怎么了?
您的信息sonar.scm.disabled
默认保留,即设置为 false。