美文网首页
Method org.postgresql.jdbc4.Jdbc

Method org.postgresql.jdbc4.Jdbc

作者: zhglance | 来源:发表于2018-08-22 17:30 被阅读118次

17:25:17:166 [Druid-ConnectionPool-Create-1566729816] ERROR log=c.a.d.p.DruidDataSource,traceId=,userId=,msg=create connection SQLException, url: jdbc:postgresql://...:5432/..., errorCode 0, state 0A000,org.postgresql.util.PSQLException: Method org.postgresql.jdbc4.Jdbc4Statement.setQueryTimeout(int) is not yet implemented.
at org.postgresql.Driver.notImplemented(Driver.java:753)
at org.postgresql.jdbc2.AbstractJdbc2Statement.setQueryTimeout(AbstractJdbc2Statement.java:656)
at com.alibaba.druid.pool.vendor.PGValidConnectionChecker.isValidConnection(PGValidConnectionChecker.java:64)
at com.alibaba.druid.pool.DruidAbstractDataSource.validateConnection(DruidAbstractDataSource.java:1346)
at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1633)
at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2468)

由于postgresql版本问题导致的,将postgresql的版本改成如下:

 <dependency>
      <groupId>org.postgresql</groupId>
      <artifactId>postgresql</artifactId>
      <version>42.0.0</version>
    </dependency>

再次执行之后,一切OK!

相关文章

网友评论

      本文标题:Method org.postgresql.jdbc4.Jdbc

      本文链接:https://www.haomeiwen.com/subject/cnvyiftx.html