无法执行目标...代码= 500

时间:2015-11-12 14:24:34

标签: sonarqube sonarqube5.2

我已升级到SonarQube 5.2,当我尝试运行分析时,我收到以下错误。 如果我尝试浏览错误消息中的URL,我会得到一个{"errors":[{"msg":""}]}的页面。我正在使用sonar-maven-plugin 2.7.1(来自org.codehaus.mojo)。 在另一个线程中,有人建议检查Sonar项目是否实际上是项目而不是模块。我检查过了。 声纳的日志显示:

127.0.0.1 - - [12/Nov/2015:12:07:56 +0000] "GET /batch_bootstrap/index HTTP/1.1" 400 49 "-" "Maven/3.0.5"

我在MS SQL Server 2008 R2上运行。

注意:当我切换到内置的Db(h2),为空时,我没有收到错误(但我实际上没有尝试过空的MS SQL Server)。     什么可能是错的?     感谢。

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.7.1:sonar (default-cli) on project infra: Fail to execute request [cod
e=500, url=<...>/batch/project.protobuf?key=com.<XXXXXXX>.SOMETHING%3ASOMETHING]: Fail to download [<...>/batch/project.protobuf?key=<XXXXXXX>.SOMETHING%3ASOMETHING]. Response code: 500 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.7.1:sonar (default-cli
) on project infra: Fail to execute request [code=500, url=<...>/batch/project.protobuf?key=<XXXXXXX>.SOMETHING%3ASOMETHING]
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
        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:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Fail to execute request [code=500, url=...]
        at org.codehaus.mojo.sonar.bootstrap.ExceptionHandling.handle(ExceptionHandling.java:41)
        at org.codehaus.mojo.sonar.bootstrap.RunnerBootstrapper.execute(RunnerBootstrapper.java:104)
        at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:135)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 19 more
Caused by: java.lang.IllegalStateException: Fail to execute request [code=500, url=...]
        at org.sonar.batch.bootstrap.ServerClient.handleHttpException(ServerClient.java:138)
        at org.sonar.batch.bootstrap.ServerClient.load(ServerClient.java:121)
        at org.sonar.batch.cache.WSLoader$3.load(WSLoader.java:86)
        at org.sonar.batch.cache.WSLoader$3.load(WSLoader.java:83)
        at org.sonar.batch.cache.WSLoader.loadFromServer(WSLoader.java:233)
        at org.sonar.batch.cache.WSLoader.loadFromServerFirst(WSLoader.java:194)
        at org.sonar.batch.cache.WSLoader.load(WSLoader.java:154)
        at org.sonar.batch.cache.WSLoader.loadStream(WSLoader.java:130)
        at org.sonar.batch.repository.DefaultProjectRepositoriesLoader.load(DefaultProjectRepositoriesLoader.java:57)
        at org.sonar.batch.repository.ProjectRepositoriesProvider.provide(ProjectRepositoriesProvider.java:47)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at org.picocontainer.injectors.MethodInjector.invokeMethod(MethodInjector.java:129)
        at org.picocontainer.injectors.MethodInjector.access$000(MethodInjector.java:39)
        at org.picocontainer.injectors.MethodInjector$2.run(MethodInjector.java:113)
        at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
        at org.picocontainer.injectors.MethodInjector.decorateComponentInstance(MethodInjector.java:120)
        at org.picocontainer.injectors.CompositeInjector.decorateComponentInstance(CompositeInjector.java:58)
        at org.picocontainer.injectors.Reinjector.reinject(Reinjector.java:142)
        at org.picocontainer.injectors.ProviderAdapter.getComponentInstance(ProviderAdapter.java:96)
        at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
        at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
        at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)
        at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)
        at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
        at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
        at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)
        at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)
        at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
        at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
        at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
        at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
        at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
        at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
        at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
        at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:678)
        at org.sonar.core.platform.ComponentContainer.getComponentByType(ComponentContainer.java:230)
        at org.sonar.batch.scan.ProjectScanContainer.doBeforeStart(ProjectScanContainer.java:120)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:98)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:85)
        at org.sonar.batch.bootstrap.GlobalContainer.executeAnalysis(GlobalContainer.java:153)
        at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:110)
        at org.sonar.runner.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:55)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at org.sonar.runner.impl.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:61)
        at com.sun.proxy.$Proxy16.execute(Unknown Source)
        at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:275)
        at org.sonar.runner.api.EmbeddedRunner.runAnalysis(EmbeddedRunner.java:166)
        at org.sonar.runner.api.EmbeddedRunner.runAnalysis(EmbeddedRunner.java:153)
        at org.codehaus.mojo.sonar.bootstrap.RunnerBootstrapper.execute(RunnerBootstrapper.java:99)
        ... 22 more
Caused by: org.sonar.api.utils.HttpDownloader$HttpException: Fail to download [...]. Response code: 500
        at org.sonar.core.util.DefaultHttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(DefaultHttpDownloader.java:343)
        at org.sonar.core.util.DefaultHttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(DefaultHttpDownloader.java:288)
        at org.sonar.batch.bootstrap.ServerClient.load(ServerClient.java:115)
        ... 75 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] h t t p : //cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
C:\Users\mmilone\source\integration\infra>

1 个答案:

答案 0 :(得分:1)

我找到了两个解决这个问题的工作方案和另一个潜在的未来解决方案

  1. 通过

    分析为新项目
    • 如此更改项目密钥
      -Dsonar.projectKey=com.<XXXXXXX>.SOMETHINGSOMETHING
    • 或删除现有项目,有效地丢失了现有的SonarQube历史记录: - (
  2. 如果您upgraded from SonarQube version 3.x via 4.5.2 LTS to 5.2并且仍然有3或4的备份,您可能会恢复到旧版本,并确保在继续升级之前对版本4 LTS上的每个项目运行分析版本5.2的路径。

  3. 因为版本5.3中的a bug in SonarQube 5.2似乎已修复 - 只需等待SonarQube 5.3发布scheduled to be released in January 2016