Wiki source code of PostgreSQL JDBC Driver Compatibility Issues
Last modified by Eleni Cojocariu on 2026/11/25 14:49
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | When starting XWiki with PostgreSQL, you may encounter the following error: | ||
| 2 | |||
| 3 | {{code language="none"}} | ||
| 4 | Method org.postgresql.jdbc4.Jdbc4Connection.isValid(int) is not yet implemented | ||
| 5 | {{/code}} | ||
| 6 | |||
| 7 | === Cause === | ||
| 8 | |||
| 9 | 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. | ||
| 10 | |||
| 11 | === Solution === | ||
| 12 | |||
| 13 | Replace the driver with a current one: | ||
| 14 | |||
| 15 | 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. | ||
| 16 | 1. Download the [[current PostgreSQL JDBC driver>>https://jdbc.postgresql.org/download/]]. | ||
| 17 | 1. Replace the old JAR with the downloaded one, keeping only one PostgreSQL driver on the classpath. | ||
| 18 | 1. Restart the servlet container. XWiki starts and connects to PostgreSQL without the error. | ||
| 19 | |||
| 20 | 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. |