Cannot Access Database due to org.postgresql.jdbc4.Jdbc4Statement.setQueryTimeout(int) is not yet implemented

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Symptoms

JIRA is unable to connect to the PostgreSQL database.

The following appears in the catalina.out:

1 2 3 4 5 6 7 8 9 10 2013-03-04 17:12:35,864 localhost-startStop-1 ERROR [NoModule] Error getting datasource via DBCP: JdbcDatasourceInfo{uri='jdbc:postgresql://localhost:5432/jiradb600', driverClassName='org.postgresql.Driver', username='jiradbuser', password='********', isolationLevel='null', connectionProperties=null, connectionPoolInfo=ConnectionPoolInfo{maxSize=20, minSize=20, initialSize=null, maxIdle=20, maxWait=30000, sleepTime=300000, lifeTime=600000, deadLockMaxWait=600000, deadLockRetryWait=10000, validationQuery='select version();', minEvictableTimeMillis=60000, timeBetweenEvictionRunsMillis=300000, poolPreparedStatements=null, testOnBorrow=null, testOnReturn=null, testWhileIdle=true, maxOpenPreparedStatements=null, numTestsPerEvictionRun=null, removeAbandonedTimeout=300, validationQueryTimeout=3, defaultCatalog=null}} org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Method org.postgresql.jdbc4.Jdbc4Statement.setQueryTimeout(int) is not yet implemented.) at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388) at org.apache.commons.dbcp.BasicDataSource.setLogWriter(BasicDataSource.java:1134) ... Caused by: 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 org.apache.commons.dbcp.DelegatingStatement.setQueryTimeout(DelegatingStatement.java:249)

Diagnosis

  1. JIRA is using a PostgreSQL database.

  2. The Validation Query Timeout has been configured in dbconfig.xml.

Cause

PostgreSQL does not have a configurable method of setting the Validation Query Timeout - it's not implemented within the JDBC driver and as such throws this exception. Please see our Tuning Database Connections for further information on these advanced configurations.

Solution

Resolution

  1. Stop JIRA.

  2. Remove the Validation Query Timeout, either by Using the JIRA Configuration Tool or modifying the dbconfig.xml directly.

  3. Start JIRA.

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.