【问题标题】:SonarQube 6.7.1 WEB not work with JDBC 42.1.4 [default]SonarQube 6.7.1 WEB 不适用于 JDBC 42.1.4 [默认]
【发布时间】:2018-07-11 16:19:42
【问题描述】:

操作系统:Uduntu 16.04 64 位 LTS
SonarQube:6.7.1
PostgreSql:9.5
Java:1.8.0_144

默认 SonarQube 有 JDBC 42.1.4,并且 web.log 中有以下错误:

ERROR web[][o.postgresql.Driver] Connection error:
org.postgresql.util.PSQLException: The connection attempt failed.
        at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:275)
        at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
        at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:194)
        at org.postgresql.Driver.makeConnection(Driver.java:450)
        at org.postgresql.Driver.connect(Driver.java:252)
        at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
        at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
        at org.apache.commons.pool.impl.GenericObjectPool.addObject(GenericObjectPool.java:1617)
        at org.apache.commons.pool.impl.GenericObjectPool.ensureMinIdle(GenericObjectPool.java:1575)
        at org.apache.commons.pool.impl.GenericObjectPool.access$700(GenericObjectPool.java:190)
        at org.apache.commons.pool.impl.GenericObjectPool$Evictor.run(GenericObjectPool.java:1709)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)
Caused by: java.net.UnknownHostException: localhost

但当我更新到 JDBC 4.2 驱动程序时,42.2.1 运行良好。

也许 sonarqube 的某个人会看到并修复它。

【问题讨论】:

    标签: sonarqube sonarqube-ops


    【解决方案1】:

    SonarQube 6.7.1 中打包的 PostgreSQL 驱动版本确实存在一些 bug。驱动程序在 SonarQube 6.7.2 中升级,在撰写本文时尚未发布。 查看相关票证:https://jira.sonarsource.com/browse/SONAR-10296

    【讨论】:

      猜你喜欢
      • 2014-08-10
      • 2019-05-28
      • 1970-01-01
      • 1970-01-01
      • 2017-01-23
      • 2020-01-22
      • 2019-03-01
      • 2018-07-15
      • 2014-07-23
      相关资源
      最近更新 更多