【问题标题】:sonarQube execution failed with "Error during SonarQube Scanner execution"sonarQube 执行失败,“SonarQube 扫描仪执行期间出错”
【发布时间】:2017-10-11 23:41:12
【问题描述】:

我已将声纳与 TFS 集成。很长一段时间以来一直运行良好。开始失败,并出现有关声纳扫描仪和 java 的错误。我没有升级任何东西或没有改变任何东西。 我在 TFS 构建期间遇到错误,

错误:SonarQube 扫描仪执行期间出错 java.lang.IllegalStateException:无法加载组件类 org.sonar.batch.report.ActiveRulesPublisher 在 org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:69) 在 org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:621) 在 org.picocontainer.parameters.CollectionComponentParameter.getArrayInstance(CollectionComponentParameter.java:334) 在 org.picocontainer.parameters.CollectionComponentParameter.access$100(CollectionComponentParameter.java:49) 在 org.picocontainer.parameters.CollectionComponentParameter$1.resolveInstance(CollectionComponentParameter.java:139) 引起:java.lang.NullPointerException 错误:使用 -X 开关重新运行 SonarQube Scanner 以启用完整的调试日志记录。 SonarQube 扫描仪未成功完成

有人可以请教吗?

【问题讨论】:

  • 您使用的是哪种 TFS 版本? vNext 或 Msbuild
  • @Patrick-MSFT - vNext 构建

标签: java tfs


【解决方案1】:

通过升级安装在 SonarQube 中的所有插件来修复它。感谢评论

【讨论】:

    【解决方案2】:

    您需要启用更详细的日志记录以尝试了解究竟是什么失败了。请按照以下步骤操作。

    • 通过添加名为的变量启用 TFS 构建调试日志记录 system.debug 并将其值设置为 'true'
    • 启用 SonarQube 组件详细日志记录 - 在您的 SonarQube 开始任务,在高级 > 附加设置下,请添加: /d:sonar.verbose=true

    只需按照错误消息中的建议进行操作即可。 Re-run SonarQube Scanner using the -X switch to enable full debug logging. 您还可以查看 SonarQube 实例的 sonar.log。可能会在那里获得有关错误的更多详细信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-07-20
      • 2017-08-26
      • 2018-03-21
      • 2017-11-02
      • 2019-01-01
      • 2017-03-15
      • 2017-07-08
      • 2018-06-18
      相关资源
      最近更新 更多