目前我们正在运行SonarQube 5.2,有些项目的代码分析失败。分析的日志文件以
结尾2015.12.09 14:47:45 ERROR [o.s.s.c.t.CeWorkerRunnableImpl] Failed to execute task AVGG_zXJpAYBX7UP-bW6
java.lang.IllegalStateException: Fail to process issues of component 'my.project:path/to/file.js'
at org.sonar.server.computation.issue.IntegrateIssuesVisitor.processIssues(IntegrateIssuesVisitor.java:74) ~[sonar-server-5.2.jar:na]
at org.sonar.server.computation.issue.IntegrateIssuesVisitor.visitAny(IntegrateIssuesVisitor.java:59) ~[sonar-server-5.2.jar:na]
at org.sonar.server.computation.component.TypeAwareVisitorWrapper.visitAny(TypeAwareVisitorWrapper.java:83) ~[sonar-server-5.2.jar:na]
at org.sonar.server.computation.component.VisitorsCrawler.visitNode(VisitorsCrawler.java:97) ~[sonar-server-5.2.jar:na]
at org.sonar.server.computation.component.VisitorsCrawler.visit(VisitorsCrawler.java:80) ~[sonar-server-5.2.jar:na]
at org.sonar.server.computation.component.VisitorsCrawler.visitChildren(VisitorsCrawler.java:90) ~[sonar-server-5.2.jar:na]
at org.sonar.server.computation.component.VisitorsCrawler.visit(VisitorsCrawler.java:77) ~[sonar-server-5.2.jar:na]
at org.sonar.server.computation.component.VisitorsCrawler.visitChildren(VisitorsCrawler.java:90) ~[sonar-server-5.2.jar:na]
at org.sonar.server.computation.component.VisitorsCrawler.visit(VisitorsCrawler.java:77) ~[sonar-server-5.2.jar:na]
at org.sonar.server.computation.step.ExecuteVisitorsStep.execute(ExecuteVisitorsStep.java:51) ~[sonar-server-5.2.jar:na]
at org.sonar.server.computation.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:39) ~[sonar-server-5.2.jar:na]
at org.sonar.server.computation.taskprocessor.report.ReportTaskProcessor.process(ReportTaskProcessor.java:53) ~[sonar-server-5.2.jar:na]
at org.sonar.server.computation.taskprocessor.CeWorkerRunnableImpl.executeTask(CeWorkerRunnableImpl.java:78) [sonar-server-5.2.jar:na]
at org.sonar.server.computation.taskprocessor.CeWorkerRunnableImpl.run(CeWorkerRunnableImpl.java:55) [sonar-server-5.2.jar:na]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_51]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_51]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_51]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_51]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_51]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_51]
Caused by: java.lang.NullPointerException: null
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:213) ~[guava-17.0.jar:na]
at com.google.common.base.Splitter.splitToList(Splitter.java:416) ~[guava-17.0.jar:na]
at org.sonar.db.source.FileSourceDao.selectLineHashes(FileSourceDao.java:74) ~[sonar-db-5.2.jar:na]
at org.sonar.server.computation.issue.TrackerBaseInputFactory$BaseLazyInput.loadLineHashSequence(TrackerBaseInputFactory.java:62) ~[sonar-server-5.2.jar:na]
at org.sonar.core.issue.tracking.LazyInput.getLineHashSequence(LazyInput.java:34) ~[sonar-core-5.2.jar:na]
at org.sonar.core.issue.tracking.LazyInput.getBlockHashSequence(LazyInput.java:42) ~[sonar-core-5.2.jar:na]
at org.sonar.core.issue.tracking.BlockRecognizer.match(BlockRecognizer.java:40) ~[sonar-core-5.2.jar:na]
at org.sonar.core.issue.tracking.Tracker.detectCodeMoves(Tracker.java:62) ~[sonar-core-5.2.jar:na]
at org.sonar.core.issue.tracking.Tracker.track(Tracker.java:45) ~[sonar-core-5.2.jar:na]
at org.sonar.server.computation.issue.TrackerExecution.track(TrackerExecution.java:41) ~[sonar-server-5.2.jar:na]
at org.sonar.server.computation.issue.IntegrateIssuesVisitor.processIssues(IntegrateIssuesVisitor.java:67) ~[sonar-server-5.2.jar:na]
... 20 common frames omitted
2015.12.09 14:47:45 ERROR [o.s.s.c.t.CeWorkerRunnableImpl] Executed task | project=my.project | id=AVGG_zXJpAYBX7UP-bW6 | time=13822ms
有人知道这里出了什么问题吗?
答案 0 :(得分:2)
看一下这篇文章。 https://groups.google.com/forum/#!topic/sonarqube/KuMEfI4V2wY。作为一种解决方法或者如果您不想自己编译SonarQube,您可以执行以下更新(根据您的数据库修改语法)
update FILE_SOURCES
set LINE_HASHES = chr(10)
where DATA_TYPE = 'SOURCE'
and LINE_HASHES is null