sonarqube 5.0给出错误获取生成密钥或设置结果到参数对象消息

时间:2015-02-25 06:16:56

标签: java oracle hudson sonarqube-5.0

我正在尝试使用SonarQube 5.0和Hudson 3.2.1。 声纳跑步版2.4。 一旦Hudson调用声纳分析,它就会以构建失败结束。 SonarQube使用ojdbc7.jar驱动程序配置了Oracle 12c数据库。

日志输出 -

[workspace] $ /opt/sonar-runner-2.4/bin/sonar-runner -Dsonar.jdbc.driver=oracle.jdbc.xa.client.OracleXADataSource -Dsonar.jdbc.url=jdbc:oracle:thin:@//host:port/URL id pass -Dsonar.host.url=http://host:port id pass -Dsonar.projectBaseDir=/basedir -Dsonar.projectName=prjName -Dsonar.projectVersion=1.0 -Dsonar.projectKey=org:prj -Dsonar.sources=.

SonarQube Runner 2.4

Java 1.7.0_75 Oracle Corporation (64-bit)

Linux 2.6.18-308.el5 amd64

INFO: Runner configuration file: /opt/sonar-runner-2.4/conf/sonar-runner.properties

INFO: Project configuration file: NONE

INFO: Default locale: "en_US", source code encoding: "UTF-8" (analysis is platform dependent)

INFO: Work directory: /basedir

INFO: SonarQube Server 5.0

04:04:54.792 INFO  - Load global referentials...

04:04:55.100 INFO  - Load global referentials done: 311 ms

04:04:55.105 INFO  - User cache: /var/lib/hudson/.sonar/cache

04:04:55.116 INFO  - Install plugins

04:04:55.196 INFO  - Install JDBC driver

04:04:55.205 INFO  - Create JDBC datasource for jdbcURL

04:04:59.095 INFO  - Initializing Hibernate

04:05:01.906 INFO  - Load project referentials...

04:05:02.242 INFO  - Load project referentials done: 336 ms

04:05:02.242 INFO  - Load project settings

04:05:02.594 INFO  - Loading technical debt model...

04:05:02.616 INFO  - Loading technical debt model done: 21 ms

04:05:02.622 INFO  - Apply project exclusions

INFO: ------------------------------------------------------------------------

INFO: EXECUTION FAILURE

INFO: ------------------------------------------------------------------------

Total time: 9.050s

Final Memory: 16M/242M

INFO: ------------------------------------------------------------------------

ERROR: Error during Sonar runner execution

ERROR: Unable to execute Sonar

ERROR: Caused by: Error getting generated key or setting result to parameter object. Cause: java.lang.NullPointerException

ERROR: 

ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch.

ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.

Finished: FAILURE

我已将主机,端口,jdbcurl等实际参数替换为占位符。

1 个答案:

答案 0 :(得分:1)

您可能正在运行Oracle 12c版本12.1.0.1.0并使用随附的JDBC驱动程序。 12.1.0.1.0附带的Oracle 12c JDBC驱动程序存在oracle.jdbc.driver.AutoKeyInfo.initMetaDataColumnIndexes()方法的错误,该方法现在已通过12.2.0修补程序修复。我猜你的错误"生成密钥"与此问题有关。您应该在SonarQube中启用日志记录,以便您可以验证根本原因。

完整帖子为here