Cannot Access Database due to org.postgresql.jdbc4.Jdbc4Statement.setQueryTimeout(int) is not yet implemented
Symptoms
JIRA is unable to connect to the PostgreSQL database.
The following appears in the catalina.out:
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
- JIRA is using a PostgreSQL database.
- 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.
Resolution
- Stop JIRA.
- Remove the Validation Query Timeout, either by Using the JIRA Configuration Tool or modifying the
dbconfig.xml
directly. - Start JIRA.
Last modified on Mar 30, 2016
Powered by Confluence and Scroll Viewport.