gpt4 book ai didi

java - SonarQube Eclipse 插件在本地分析时抛出错误

转载 作者:塔克拉玛干 更新时间:2023-11-03 05:32:56 26 4
gpt4 key购买 nike

我们正在运行 SonarQube 3.7。我在 Eclipse 3.7.2 上使用 Eclipse 的 SonarQube 插件,版本 3.2.0.20130627-1142。我已将我的项目与 SonarQube 项目相关联,并且能够很好地从服务器端查看问题。但是,如果我切换到本地分析,在运行 CheckStyle、PMD 等之后,我会收到以下错误:

15:16:23.217 INFO  - Execute decorators...
Exception in thread "main" org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:79)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:63)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:57)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.impl.BatchLauncherMain.execute(BatchLauncherMain.java:41)
at org.sonar.runner.impl.BatchLauncherMain.main(BatchLauncherMain.java:59)
Caused by: org.sonar.api.utils.SonarException: Fail to decorate 'CLASSPATH.REDACTED.ClockEventHelperIT'
at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:85)
at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:71)
at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:64)
at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:64)
at org.sonar.batch.phases.DecoratorsExecutor.execute(DecoratorsExecutor.java:56)
at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:118)
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:142)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:88)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:73)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:186)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:181)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:174)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:88)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:73)
at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:57)
at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45)
at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:82)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:88)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:73)
at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:156)
at org.sonar.batch.bootstrap.BootstrapContainer.doAfterStart(BootstrapContainer.java:144)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:88)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:73)
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:45)
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:75)
... 6 more
Caused by: org.sonar.api.utils.HttpDownloader$HttpException: Fail to download [http://cm-sonar/api/sources?resource=REDACTED:shared-core:REDACTED.ClockEventHelperIT&format=txt]. Response code: 500
at org.sonar.api.utils.HttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(HttpDownloader.java:266)
at org.sonar.api.utils.HttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(HttpDownloader.java:230)
at org.sonar.batch.bootstrap.ServerClient.request(ServerClient.java:88)
at org.sonar.batch.bootstrap.ServerClient.request(ServerClient.java:82)
at org.sonar.batch.scan.LastSnapshots.loadSourceFromWs(LastSnapshots.java:62)
at org.sonar.batch.scan.LastSnapshots.getSource(LastSnapshots.java:52)
at org.sonar.plugins.core.issue.IssueTracking.mapIssues(IssueTracking.java:82)
at org.sonar.plugins.core.issue.IssueTracking.track(IssueTracking.java:59)
at org.sonar.plugins.core.issue.IssueTrackingDecorator.doDecorate(IssueTrackingDecorator.java:107)
at org.sonar.plugins.core.issue.IssueTrackingDecorator.decorate(IssueTrackingDecorator.java:91)
at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:80)
... 36 more

服务器上一切正常。有什么想法吗?

最佳答案

在运行本地分析时,我的安装(Sonar v3.7.2、Eclipse 插件 v3.2 和 Eclipse 4.3)也遇到了“无法执行 Sonar...无法下载...响应代码:500”。

我注意到我的堆栈跟踪中的一个类由行引起(您的类显示“ClockEventHelperIT”)。该类在我的服务器端存储库中不存在(它是新的)并且也位于默认的 Java 包中。这是一个一次性类(class),所以我决定删除它并重新运行分析。这为我解决了这个问题。

关于java - SonarQube Eclipse 插件在本地分析时抛出错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19415033/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com