我最近将sonarqube升级到4.3.2版本,之后,我一直面对这个错误很长一段时间没有解决方案,有人经历过这样的事情吗?
执行命令:mvn -X clean install声纳:声纳
[INFO] [17:37:00.484] Execute decorators...
[DEBUG] [17:37:00.484] Decorators: ManualMeasureDecorator -> PitestDecorator -> SumDuplicationsDecorator -> org.sonar.plugins.core.issue.IssueTrackingDecorator@4b665aa8 -> UnitTestDecorator -> org.sonar.plugins.core.security.ApplyProjectRolesDecorator@35bcae8d -> org.sonar.plugins.core.sensors.DirectoriesDecorator@69a18b35 -> org.sonar.plugins.core.sensors.FilesDecorator@6cba7ac0 -> org.sonar.plugins.core.timemachine.TimeMachineConfigurationPersister@1d79c024 -> org.sonar.plugins.core.timemachine.NewCoverageFileAnalyzer@46d10b04 -> org.sonar.plugins.core.timemachine.NewItCoverageFileAnalyzer@462a57ee -> org.sonar.plugins.core.timemachine.NewOverallCoverageFileAnalyzer@5f2ee3f -> org.sonar.plugins.core.timemachine.NewCoverageAggregator@ff76d26 -> org.sonar.plugins.design.batch.ProjectDsmDecorator@24358a9a -> FileTangleIndexDecorator -> f(lines) -> f(generated_lines) -> f(ncloc) -> f(generated_ncloc) -> f(classes) -> f(packages) -> f(functions) -> f(accessors) -> f(statements) -> f(public_api) -> f(comment_lines) -> f(comment_blank_lines) -> f(public_undocumented_api) -> f(commented_out_code_lines) -> f(complexity) -> f(complexity_in_classes) -> f(complexity_in_functions) -> f(class_complexity_distribution) -> f(function_complexity_distribution) -> f(file_complexity_distribution) -> f(lines_to_cover) -> f(uncovered_lines) -> f(conditions_to_cover) -> f(uncovered_conditions) -> f(it_lines_to_cover) -> f(it_uncovered_lines) -> f(it_conditions_to_cover) -> f(it_uncovered_conditions) -> f(overall_lines_to_cover) -> f(overall_uncovered_lines) -> f(overall_conditions_to_cover) -> f(overall_uncovered_conditions) -> f(rfc) -> f(rfc_distribution) -> f(lcom4_distribution) -> f(package_cycles) -> f(package_tangles) -> f(package_feedback_edges) -> f(package_edges_weight) -> f(new_lines_to_cover) -> f(new_uncovered_lines) -> f(new_conditions_to_cover) -> f(new_uncovered_conditions) -> f(new_it_lines_to_cover) -> f(new_it_uncovered_lines) -> f(new_it_conditions_to_cover) -> f(new_it_uncovered_conditions) -> f(new_overall_lines_to_cover) -> f(new_overall_uncovered_lines) -> f(new_overall_conditions_to_cover) -> f(new_overall_uncovered_conditions) -> org.sonar.plugins.pitest.PitestCoverageDecorator@3d4c7ce2 -> org.sonar.plugins.cpd.decorators.DuplicationDensityDecorator@1648ec79 -> org.sonar.plugins.secrules.SecurityRulesDecorator@d9d075d -> CountUnresolvedIssuesDecorator -> CountFalsePositivesDecorator -> org.sonar.plugins.core.technicaldebt.DebtDecorator@651af9ef -> org.sonar.plugins.core.technicaldebt.NewDebtDecorator@4e0eedc4 -> CommentDensityDecorator -> PackageTangleIndexDecorator -> f(file_complexity) -> f(class_complexity) -> f(function_complexity) -> org.sonar.plugins.core.sensors.CoverageDecorator@10b933f3 -> org.sonar.plugins.core.sensors.LineCoverageDecorator@6f019f18 -> org.sonar.plugins.core.sensors.xxanchCoverageDecorator@53741997 -> org.sonar.plugins.core.sensors.ItLineCoverageDecorator@6a08c023 -> org.sonar.plugins.core.sensors.ItCoverageDecorator@647e7037 -> org.sonar.plugins.core.sensors.ItxxanchCoverageDecorator@28f95e6c -> org.sonar.plugins.core.sensors.OverallLineCoverageDecorator@ba61978 -> org.sonar.plugins.core.sensors.OverallCoverageDecorator@45d21b41 -> org.sonar.plugins.core.sensors.OverallxxanchCoverageDecorator@64fb6c36 -> org.sonar.plugins.core.issue.WeightedIssuesDecorator@61742731 -> IssuesDensityDecorator -> org.sonar.plugins.core.timemachine.TendencyDecorator@171bcac1 -> VariationDecorator
[DEBUG] [17:37:00.545] Reload the data measure: last_commit_datetimes_by_line, id=149355429
[DEBUG] [17:37:00.546] Flush 1 data measures from memory:
[DEBUG] [17:37:00.547] Reload the data measure: last_commit_datetimes_by_line, id=149355429
[DEBUG] [17:37:00.548] Flush 1 data measures from memory:
[DEBUG] [17:37:00.549] Reload the data measure: last_commit_datetimes_by_line, id=149355429
[DEBUG] [17:37:00.549] Flush 1 data measures from memory:
[DEBUG] [17:37:00.627] Reload the data measure: last_commit_datetimes_by_line, id=149355432
[DEBUG] [17:37:00.627] Flush 1 data measures from memory:
[DEBUG] [17:37:00.628] Reload the data measure: last_commit_datetimes_by_line, id=149355432
[DEBUG] [17:37:00.628] Flush 1 data measures from memory:
[DEBUG] [17:37:00.629] Reload the data measure: last_commit_datetimes_by_line, id=149355432
[DEBUG] [17:37:00.629] Flush 1 data measures from memory:
[DEBUG] [17:37:00.668] Release semaphore on project : org.sonar.api.resources.Project@2b4bb482[id=3106,key=xx.xxx.xxxxxx.sig:system,qualifier=TRK], with key batch-xx.xxx.xxxxxx.sig:system
[DEBUG] [17:37:00.701] To prevent a memory leak, the JDBC Driver [net.sourceforge.jtds.jdbc.Driver] has been forcibly deregistered
[ERROR] Fail to decorate 'org.sonar.api.resources.File@6dcb8f7a[key=src/main/java/xx/xxx/xxxxxx/sig/web/map/spec/controller/MedicaospecController.java,deprecatedKey=xx.xxx.xxxxxx.sig.web.map.spec.controller.MedicaospecController,path=src/main/java/xx/xxx/xxxxxx/sig/web/map/spec/controller/MedicaospecController.java,dir=xx/xxx/xxxxxx/sig/web/map/spec/controller,filename=MedicaospecController.java,language=Java]'
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:49 min
[INFO] Finished at: 2014-07-21T17:37:00-03:00
[INFO] Final Memory: 42M/967M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.4:sonar (default-cli) on project system: Fail to decorate 'org.sonar.api.resources.File@6dcb8f7a[key=src/main/java/xx/xxx/xxxxxx/sig/web/map/spec/controller/MedicaospecController.java,deprecatedKey=xx.xxx.xxxxxx.sig.web.map.spec.controller.MedicaospecController,path=src/main/java/xx/xxx/xxxxxx/sig/web/map/spec/controller/MedicaospecController.java,dir=xx/xxx/xxxxxx/sig/web/map/spec/controller,filename=MedicaospecController.java,language=Java]': Line must be null or greater than zero (got 0) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.4:sonar (default-cli) on project system: Fail to decorate 'org.sonar.api.resources.File@6dcb8f7a[key=src/main/java/xx/xxx/xxxxxx/sig/web/map/spec/controller/MedicaospecController.java,deprecatedKey=xx.xxx.xxxxxx.sig.web.map.spec.controller.MedicaospecController,path=src/main/java/xx/xxx/xxxxxx/sig/web/map/spec/controller/MedicaospecController.java,dir=xx/xxx/xxxxxx/sig/web/map/spec/controller,filename=MedicaospecController.java,language=Java]'
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Fail to decorate 'org.sonar.api.resources.File@6dcb8f7a[key=src/main/java/xx/xxx/xxxxxx/sig/web/map/spec/controller/MedicaospecController.java,deprecatedKey=xx.xxx.xxxxxx.sig.web.map.spec.controller.MedicaospecController,path=src/main/java/xx/xxx/xxxxxx/sig/web/map/spec/controller/MedicaospecController.java,dir=xx/xxx/xxxxxx/sig/web/map/spec/controller,filename=MedicaospecController.java,language=Java]'
at org.codehaus.mojo.sonar.bootstrap.ExceptionHandling.handle(ExceptionHandling.java:42)
at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:135)
at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:136)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: org.sonar.api.utils.SonarException: Fail to decorate 'org.sonar.api.resources.File@6dcb8f7a[key=src/main/java/xx/xxx/xxxxxx/sig/web/map/spec/controller/MedicaospecController.java,deprecatedKey=xx.xxx.xxxxxx.sig.web.map.spec.controller.MedicaospecController,path=src/main/java/xx/xxx/xxxxxx/sig/web/map/spec/controller/MedicaospecController.java,dir=xx/xxx/xxxxxx/sig/web/map/spec/controller,filename=MedicaospecController.java,language=Java]'
at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:93)
at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:76)
at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:69)
at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:69)
at org.sonar.batch.phases.DecoratorsExecutor.execute(DecoratorsExecutor.java:61)
at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:135)
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:178)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:199)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:194)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:187)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:56)
at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:44)
at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:82)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:175)
at org.sonar.batch.bootstrap.BootstrapContainer.doAfterStart(BootstrapContainer.java:163)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:92)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:74)
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:100)
at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:131)
... 22 more
Caused by: java.lang.IllegalArgumentException: Line must be null or greater than zero (got 0)
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:88)
at org.sonar.api.issue.internal.DefaultIssue.setLine(DefaultIssue.java:193)
at org.sonar.core.issue.db.IssueDto.toDefaultIssue(IssueDto.java:426)
at org.sonar.plugins.core.issue.IssueTrackingDecorator.addUnmatched(IssueTrackingDecorator.java:188)
at org.sonar.plugins.core.issue.IssueTrackingDecorator.doDecorate(IssueTrackingDecorator.java:121)
at org.sonar.plugins.core.issue.IssueTrackingDecorator.decorate(IssueTrackingDecorator.java:100)
at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:85)
... 59 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Sonar analysis completed: FAILURE
Build step 'Sonar' changed build result to FAILURE
Build step 'Sonar' marked build as failure
Sending e-mails to: userx@xxxxxx.xxx.xx
Finished: FAILURE