【问题标题】:Sonar scanner analysis hangs out on util.lang.ConcreteReceiverGuard声纳扫描仪分析挂在 util.lang.ConcreteReceiverGuard
【发布时间】:2018-02-05 16:57:09
【问题描述】:

我正在使用 sonar-java 和以下配置对 java 项目进行声纳分析:

SonarQuber Servcer 5.6
Sonar-java 4.10.0.10260
SonarQube Scanner 3.0.3.778
Java 1.8.0_121 Oracle Corporation (64-bit)

当我开始声纳分析时,它似乎一直在工作,直到我得到以下日志,然后分析继续永远运行(上次它整夜运行):

util.lang.ConcreteReceiverGuard reports a runtime deprecation: calling method "padl.kernel.impl.CodeLevelModel.create()" from class "it.unibz.sonarqube_plugin.ExampleSensor"
Please use the methods in "padl.generator.helper.ModelGenerator" to obtain code-level models.

如何查看问题所在以及如何解决?

我应该注意:

  • 多个项目使用相同的服务器和相同的规则,它们具有相同的消息,但分析仍在继续。
  • 即使我使用调试标志运行 sonar-scanner -X,我也不会收到更多消息。

如果需要,分析的完整日志在这里(请注意,当分析由 jenkins 发布作业任务启动时也会出现此问题):

INFO: Scanner configuration file: XXX\sonar-scanner.properties
INFO: Project root configuration file: XXX\sonar-project.properties
INFO: SonarQube Scanner 3.0.3.778
INFO: Java 1.8.0_121 Oracle Corporation (64-bit)
INFO: Windows 7 6.1 amd64
INFO: User cache: XXX\.sonar\cache
INFO: Load global repositories
INFO: Load global repositories (done) | time=102ms
INFO: User cache: XXX\.sonar\cache
INFO: Load plugins index
INFO: Load plugins index (done) | time=6ms
INFO: SonarQube server 5.6
INFO: Default locale: "fr_FR", source code encoding: "UTF-8"
INFO: Process project properties
INFO: Load project repositories
INFO: Load project repositories (done) | time=112ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=16ms
INFO: Load active rules
INFO: Load active rules (done) | time=153ms
INFO: Publish mode
INFO: -------------  Scan Pricing - Serveur
INFO: Load server rules
INFO: Load server rules (done) | time=84ms
INFO: Base dir: XXX\server
INFO: Working dir: XXX\server\.scannerwork
INFO: Source paths: src
INFO: Source encoding: UTF-8, default locale: fr_FR
INFO: Index files
INFO: Excluded sources: 
INFO:   src/main/js/node_modules/**
INFO:   src/main/webapp/**
INFO: 584 files indexed
INFO: 230 files ignored because of inclusion/exclusion patterns
INFO: Quality profile for java: XXX Java
INFO: Sensor Lines Sensor
INFO: Sensor Lines Sensor (done) | time=77ms
INFO: Sensor JavaSquidSensor
INFO: Configured Java source version (sonar.java.source): 7
INFO: JavaClasspath initialization
INFO: JavaClasspath initialization (done) | time=6ms
INFO: JavaTestClasspath initialization
INFO: JavaTestClasspath initialization (done) | time=0ms
INFO: Java Main Files AST scan
INFO: 584 source files to be analyzed
INFO: 213/584 files analyzed, current file: XXX\XXX.java
INFO: 255/584 files analyzed, current file: XXX\XXX.java
INFO: 473/584 files analyzed, current file: XXX\XXX.java
INFO: Java Main Files AST scan (done) | time=35221ms
INFO: 584/584 source files have been analyzed
INFO: Java Test Files AST scan
INFO: 0 source files to be analyzed
INFO: Java Test Files AST scan (done) | time=0ms
INFO: 0/0 source files have been analyzed
INFO: Sensor JavaSquidSensor (done) | time=35823ms
INFO: Sensor ExampleSensor
INFO: BaseDir----->XXX\server
Analysing Test...
util.lang.ConcreteReceiverGuard reports a runtime deprecation: calling method "padl.kernel.impl.CodeLevelModel.create()" from class "it.unibz.sonarqube_plugin.ExampleSensor"
Please use the methods in "padl.generator.helper.ModelGenerator" to obtain code-level models.

【问题讨论】:

  • 您的实例中似乎有自定义插件。尝试删除它们(重启服务器)并重新分析。

标签: java sonarqube sonarqube-scan


【解决方案1】:

在执行Sensor ExampleSensor 期间您的分析失败。此分析步骤由安装在 SonarQube 服务器上的插件之一提供(显然是 it.unibz.sonarqube_plugin.ExampleSensor)。

您需要联系这个(可能是专有的)插件的维护者并将其提交给他们(可能是一个错误)。或者至少与您的 SonarQube 管理员共享此上下文(以防示例传感器不影响实际项目)。

【讨论】:

  • 感谢您的回答。我会试着和管理员一起看看这个插件是什么。
猜你喜欢
  • 2018-03-14
  • 2017-08-19
  • 2017-04-27
  • 2019-10-27
  • 2018-02-09
  • 2019-03-09
  • 2018-08-30
  • 2016-12-01
  • 2020-08-30
相关资源
最近更新 更多