Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SonarQube Eclipse plugin throws error on local analysis

We are running SonarQube 3.7. I'm using the SonarQube plugin for Eclipse, version 3.2.0.20130627-1142, on Eclipse 3.7.2. I have associated my projects with the SonarQube projects and am able to view issues from the server side great. However, if I switch to Local analysis, I get the following error, after CheckStyle, PMD, etc have run:

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

Everything runs fine on the server. Any ideas?

like image 674
Tyrel Avatar asked Oct 16 '13 22:10

Tyrel


1 Answers

I also encountered a "Unable to execute Sonar... Fail to download... Response code: 500" with my installation (Sonar v3.7.2, Eclipse plugin v3.2 and Eclipse 4.3) when running a local analysis.

I noticed one of my classes in my stacktrace Caused by line (where yours shows "ClockEventHelperIT"). The class doesn't exist in my server side repository (it's new) and is also located in the default Java package. It was a throwaway class so I decided to remove it and re-run the analysis. That solved it for me.

like image 73
umk Avatar answered Nov 04 '22 02:11

umk