PostgreSQL JDBC Driver Compatibility Issues

Last modified by Eleni Cojocariu on 2026/08/14 19:35

Explanation

When starting XWiki with PostgreSQL, you may encounter the following error:

Method org.postgresql.jdbc4.Jdbc4Connection.isValid(int) is not yet implemented

Cause

The PostgreSQL JDBC driver on the XWiki classpath is too old: it does not implement the isValid(int) method that the servlet container's connection pool calls to validate pooled connections.

Solution

Replace the driver with a current one:

  1. Locate the postgresql-*.jar file in the XWiki web application's WEB-INF/lib directory, or in the servlet container's shared library directory.
  2. Download the current PostgreSQL JDBC driver.
  3. Replace the old JAR with the downloaded one, keeping only one PostgreSQL driver on the classpath.
  4. Restart the servlet container. XWiki starts and connects to PostgreSQL without the error.

If the driver came from a Linux distribution package rather than a manual download, upgrade that package instead, so that the package manager keeps managing the file.

Related

Get Connected