I wanted to migrate our Java servlet to use Hikari Connection Pool instead of C3P0. However, I have encountered a strange bug - during the Hibernate bootup, the servlet crashes with :
Method org.postgresql.jdbc4.Jdbc4Connection.isValid(int) is not yet implemented.
This is a weird behaviour, as we are using the newest JDBC41 postgresql driver, excerpt from our pom.xml:
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.3-1102-jdbc41</version>
</dependency>
and according to the changelog of JDBC driver, the isValid()
method should already be properly implemented in 9.3-1102. We were using this version of the driver with C3P0 and had absolutely no problems.
We have also tried using the Pgsql-NG
JDBC driver which was working correctly, but was buggy when handling the PostGIS datatypes.
I also tried setting up the connectionTestQuery
in the Hikari configuration to SELECT 1
to force Hikari not to use the isValid()
, but this had no effect.
Has anyone some experiences with this problem or some workarounds?