druid和postgresql不兼容?

rbpvctlc  于 2022-12-31  发布在  Druid
关注(0)|答案(5)|浏览(494)

PostgreJDBC版本42.2.1
Druid版本1.1.6

org.postgresql.util.PSQLException: 这个 org.postgresql.jdbc4.Jdbc4Statement.setQueryTimeout(int) 方法尚未被实作。
at org.postgresql.Driver.notImplemented(Driver.java:738) ~[postgresql-8.3-606.jdbc4.jar:na]
at org.postgresql.jdbc2.AbstractJdbc2Statement.setQueryTimeout(AbstractJdbc2Statement.java:616) ~[postgresql-8.3-606.jdbc4.jar:na]
at com.alibaba.druid.pool.vendor.PGValidConnectionChecker.isValidConnection(PGValidConnectionChecker.java:64) ~[druid-1.1.6.jar:1.1.6]
at com.alibaba.druid.pool.DruidAbstractDataSource.validateConnection(DruidAbstractDataSource.java:1304) ~[druid-1.1.6.jar:1.1.6]
at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1585) ~[druid-1.1.6.jar:1.1.6]
at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2450) ~[druid-1.1.6.jar:1.1.6]

gzjq41n4

gzjq41n41#

升级驱动版本吧,比如9.4.1212/

7gcisfzg

7gcisfzg2#

<dependency>
		<groupId>org.postgresql</groupId>
		<artifactId>postgresql</artifactId>
		<version>42.2.1</version>
		<scope>compile</scope>
	</dependency>

	<dependency>
		<groupId>com.alibaba</groupId>
		<artifactId>druid</artifactId>
		<version>1.1.6</version>
	</dependency>

还是没有用。
@wenshao

7y4bm7vi

7y4bm7vi3#

问题解决了么 @GeniusMK2

iih3973s

iih3973s5#

我测试42.2.1没问题啊。。。

相关问题