5

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>
4

1 に答える 1

1

この問題に対する2つの有効な解決策と、別の潜在的な将来の解決策を見つけました

  1. いずれかの方法で新しいプロジェクトとして分析する

    • プロジェクトキーを次のように変更します
      -Dsonar.projectKey=com.<XXXXXXX>.SOMETHINGSOMETHING
    • または既存のプロジェクトを削除すると、既存の SonarQube 履歴が事実上失われます :-(
  2. SonarQube バージョン 3.x から 4.5.2 LTS 経由で 5.2にアップグレードし、まだ 3 または 4 からのバックアップがある場合は、古いバージョンに戻して、バージョン 4 LTS で各プロジェクトの分析を実行する前に確認してください。バージョン 5.2 へのアップグレード パスを続行します。

  3. これはバージョン 5.3 で修正された SonarQube 5.2 のバグのようです - 2016 年 1 月にリリースされる予定の SonarQube 5.3 のリリースをお待ちください。

于 2015-12-01T16:37:58.657 に答える