Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-31981

The JIRA Configuration Tool allows setting of a Validation Query Timeout that can cause exceptions

    XMLWordPrintable

Details

    Description

      Summary

      The JIRA Configuration Tool allows you to set a Validation Query Timeout for DBMS other than MySQL. This can cause exceptions with JIRA and prevent it from starting up at all using PostgreSQL.

      Environment

      • Mac OS X
      • PostgreSQL 9.1

      Steps to Reproduce

      1. Open up the JIRA Configuration Tool.
      2. Set up a database connection for PostgreSQL.
      3. Enter the Validation Query Timeout and save.
      4. Start up JIRA.

      Expected Results

      The Config Tool prevents setting this field for PostgreSQL (and potentially other databases).

      Actual Results

      JIRA starts up and throws the below exception:

      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)
      

      Notes

      Behaviour is documented in https://confluence.atlassian.com/display/JIRAKB/Cannot+Access+Database+due+to+org.postgresql.jdbc4.Jdbc4Statement.setQueryTimeout%28int%29+is+not+yet+implemented

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dcurrie@atlassian.com Dave C
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: