问题
I try to migrate from 5.1 to 5.3 version of SonarQube. SonarQube plugins:
- Cobertura 1.6.3 (cobertura)
- C# 4.4 (csharp)
- Java 3.9 (java)
- XML 1.4 (xml)
- Git 1.0 (scmgit)
- SVN 1.2 (scmsvn)
- JavaScript 2.10 (javascript)
My project use Java, XML, JavaScript and jaCoCo code coverage.
The client side analysis works fine, but I have a stack-trace in logs during the server-side integration:
(end of logs)
2016.02.04 10:45:17 INFO [o.s.s.c.s.ComputationStepExecutor] Log scanner context | time=11ms
2016.02.04 10:45:17 INFO [o.s.s.c.s.ComputationStepExecutor] Load analysis metadata | time=1ms
2016.02.04 10:45:17 INFO [o.s.s.c.s.ComputationStepExecutor] Build tree of components | time=236ms
2016.02.04 10:45:17 INFO [o.s.s.c.s.ComputationStepExecutor] Validate project | time=25ms
2016.02.04 10:45:17 INFO [o.s.s.c.s.ComputationStepExecutor] Load debt model | time=1ms
2016.02.04 10:45:17 INFO [o.s.s.c.s.ComputationStepExecutor] Load quality profiles | time=63ms
2016.02.04 10:45:17 INFO [o.s.s.c.s.ComputationStepExecutor] Load Quality gate | time=2ms
2016.02.04 10:45:17 INFO [o.s.s.c.s.ComputationStepExecutor] Load differential periods | time=74ms
2016.02.04 10:45:17 INFO [o.s.s.c.s.ComputationStepExecutor] Load inner file and in project duplications | time=76ms
2016.02.04 10:45:17 INFO [o.s.s.c.d.CrossProjectDuplicationStatusHolderImpl] Cross project duplication is disabled because it's disabled in the analysis report
2016.02.04 10:45:17 INFO [o.s.s.c.s.ComputationStepExecutor] Compute cross project duplications | time=0ms
2016.02.04 10:45:17 INFO [o.s.s.c.s.ComputationStepExecutor] Compute size measures | time=309ms
2016.02.03 16:22:20 ERROR [o.s.s.c.t.CeWorkerCallableImpl] Failed to execute task AVKn8PiS4ITZfzVrMvMq
org.sonar.server.computation.component.VisitException: Visit failed for Component {key=XXXX:XXXX-commons-client:src/main/java/com/XXXX/instrument/InstrumentFrame.java,type=FILE} located XXXX:XXXX-commons-client:src/main/java/com/XXXX/instrument(type=DIRECTORY)->XXXX:XXXX-commons-client(type=MODULE)->XXXX:XXXX(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.run(FutureTask.java:266) [na:1.8.0_60]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_60]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_60]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_60]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_60]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_60]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_60]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_60]
Caused by: java.lang.IllegalArgumentException: There's no changeset on line 1352
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.ReportScmInfo.getChangesetForLine(ReportScmInfo.java:71) ~[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]
... 23 common frames omitted
2016.02.03 16:22:20 ERROR [o.s.s.c.t.CeWorkerCallableImpl] Executed task | project=XXXX:XXXX | id=AVKn8PiS4ITZfzVrMvMq | time=5138ms
Note:
- In previous analysis, the file
InstrumentFrame.java
has 1355 lines and we have a JaCoCo coverage data for block 1349-1352. - In the current analysis, the file
InstrumentFrame.java
has now 1351 lines (then 1352 is out of the file) - If I add the file in
source file exclusions
, the analysis will succeed - After a successfull analysis, I can safely remove the file from exclusion list, the next analyze will continue to work
回答1:
Just exclude src/main/java/com/XXXX/instrument/InstrumentFrame.java
file and run analysis It will succeed.Now again put this file back src/main/java/com/XXXX/instrument/InstrumentFrame.java
and run the analysis again it will succeed with src/main/java/com/XXXX/instrument/InstrumentFrame.java
file.
Don't know why but this is happening anyway It has solved my problem.
Cheers!
回答2:
To make it more clear as answer instead of a comment:
You have to stop SonarQube and remove the data/es
directory.
来源:https://stackoverflow.com/questions/35201372/sonarqube-5-3-illegalargumentexception-theres-no-changeset-on-line-1352