org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Method org.postgresql.jdbc4.Jdbc4Statement.setQueryTimeout(int) is not yet implemented.)

atlassian.com | 8 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    h3. Summary The [JIRA Configuration Tool|http://confluence.atlassian.com/display/JIRA/Using+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. h3. Environment * Mac OS X * PostgreSQL 9.1 h3. Steps to Reproduce # Open up the [JIRA Configuration Tool|http://confluence.atlassian.com/display/JIRA/Using+the+JIRA+Configuration+Tool]. # Set up a database connection for PostgreSQL. # Enter the Validation Query Timeout and save. # Start up JIRA. h3. Expected Results The Config Tool prevents setting this field for PostgreSQL (and potentially other databases). h3. Actual Results JIRA starts up and throws the below exception: {noformat} 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) {noformat} h3. 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

    Atlassian JIRA | 4 years ago | David Currie [Atlassian]
    org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Method org.postgresql.jdbc4.Jdbc4Statement.setQueryTimeout(int) is not yet implemented.)
  2. 0

    h3. Summary The [JIRA Configuration Tool|http://confluence.atlassian.com/display/JIRA/Using+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. h3. Environment * Mac OS X * PostgreSQL 9.1 h3. Steps to Reproduce # Open up the [JIRA Configuration Tool|http://confluence.atlassian.com/display/JIRA/Using+the+JIRA+Configuration+Tool]. # Set up a database connection for PostgreSQL. # Enter the Validation Query Timeout and save. # Start up JIRA. h3. Expected Results The Config Tool prevents setting this field for PostgreSQL (and potentially other databases). h3. Actual Results JIRA starts up and throws the below exception: {noformat} 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) {noformat} h3. 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

    Atlassian JIRA | 4 years ago | David Currie [Atlassian]
    org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Method org.postgresql.jdbc4.Jdbc4Statement.setQueryTimeout(int) is not yet implemented.)
  3. 0

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

    atlassian.com | 8 months ago
    org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Method org.postgresql.jdbc4.Jdbc4Statement.setQueryTimeout(int) is not yet implemented.)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Could not determine database type - Atlassian Answers

    atlassian.com | 1 year ago
    org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Login failed for user 'ABNOLOGY\SVC_Jira'.)
  6. 0

    It seems that there is a bug in the jTDS driver within JIRA, related to SSL connections to SQL Server, see here: * http://sourceforge.net/p/jtds/bugs/725/ h4. Problem JIRA attempting to connect to SQL Server over SSL results in {{Network error IOException: Connection reset}}. * JIRA is running with Java 1.8 * JIRA is using jtds driver * Logs show: {code} 2014-09-03 22:50:45,342 localhost-startStop-1 ERROR [NoModule] Error getting datasource via DBCP: JdbcDatasourceInfo{uri='jdbc:jtds:sqlserver://ipaddress:443/jiradb;ssl=true', driverClassName='net.sourceforge.jtds.jdbc.Driver', username='jirauser', 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 1', minEvictableTimeMillis=60000, timeBetweenEvictionRunsMillis=300000, poolPreparedStatements=null, testOnBorrow=null, testOnReturn=null, testWhileIdle=true, maxOpenPreparedStatements=null, numTestsPerEvictionRun=null, removeAbandonedTimeout=300, validationQueryTimeout=null, defaultCatalog=null}} org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Network error IOException: Connection reset) 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) at org.ofbiz.core.entity.transaction.DBCPConnectionFactory.getConnection(DBCPConnectionFactory.java:109) at org.ofbiz.core.entity.ConnectionFactory.tryGenericConnectionSources(ConnectionFactory.java:69) at org.ofbiz.core.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:146) at org.ofbiz.core.entity.TransactionFactory.getConnection(TransactionFactory.java:101) at org.ofbiz.core.entity.ConnectionFactory.getConnection(ConnectionFactory.java:59) at org.ofbiz.core.entity.ConnectionFactory$1.getConnection(ConnectionFactory.java:52) at org.ofbiz.core.entity.jdbc.DatabaseUtil.getConnection(DatabaseUtil.java:132) at org.ofbiz.core.entity.jdbc.DatabaseUtil.getTableNames(DatabaseUtil.java:903) at org.ofbiz.core.entity.jdbc.DatabaseUtil.checkDb(DatabaseUtil.java:166) at org.ofbiz.core.entity.jdbc.DatabaseUtil.checkDb(DatabaseUtil.java:144) at org.ofbiz.core.entity.GenericDAO.checkDb(GenericDAO.java:1315) at org.ofbiz.core.entity.GenericHelperDAO.checkDataSource(GenericHelperDAO.java:270) at org.ofbiz.core.entity.GenericDelegator.initialiseAndCheckDatabase(GenericDelegator.java:236) at org.ofbiz.core.entity.GenericDelegator.<init>(GenericDelegator.java:167) at org.ofbiz.core.entity.GenericDelegator$1.load(GenericDelegator.java:91) at org.ofbiz.core.entity.GenericDelegator$1.load(GenericDelegator.java:88) at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3573) at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2350) at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2313) at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2228) at com.google.common.cache.LocalCache.get(LocalCache.java:3970) at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974) at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4834) at com.google.common.cache.LocalCache$LocalManualCache.getUnchecked(LocalCache.java:4839) at org.ofbiz.core.entity.GenericDelegator.getGenericDelegator(GenericDelegator.java:105) at com.atlassian.core.ofbiz.CoreFactory.getGenericDelegator(CoreFactory.java:38) at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.configureOfbiz(DatabaseConfigurationManagerImpl.java:237) at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrEnqueue(DatabaseConfigurationManagerImpl.java:321) at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrWhenDatabaseConfigured(DatabaseConfigurationManagerImpl.java:220) at com.atlassian.jira.startup.DefaultJiraLauncher.postDbLaunch(DefaultJiraLauncher.java:106) at com.atlassian.jira.startup.DefaultJiraLauncher.access$100(DefaultJiraLauncher.java:31) at com.atlassian.jira.startup.DefaultJiraLauncher$1.run(DefaultJiraLauncher.java:78) at com.atlassian.jira.util.devspeed.JiraDevSpeedTimer.run(JiraDevSpeedTimer.java:34) at com.atlassian.jira.startup.DefaultJiraLauncher.start(DefaultJiraLauncher.java:73) at com.atlassian.jira.startup.LauncherContextListener.contextInitialized(LauncherContextListener.java:71) <+5> (StandardContext.java:4992) (StandardContext.java:5490) (LifecycleBase.java:150) (ContainerBase.java:1575) (ContainerBase.java:1565) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.sql.SQLException: Network error IOException: Connection reset at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:395) at net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java:50) at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582) at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545) ... 46 more Caused by: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(Unknown Source) at java.net.SocketInputStream.read(Unknown Source) at net.sourceforge.jtds.ssl.TdsTlsInputStream.readFully(TdsTlsInputStream.java:131) at net.sourceforge.jtds.ssl.TdsTlsInputStream.primeBuffer(TdsTlsInputStream.java:100) at net.sourceforge.jtds.ssl.TdsTlsInputStream.read(TdsTlsInputStream.java:78) at sun.security.ssl.InputRecord.read(Unknown Source) at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at net.sourceforge.jtds.ssl.SocketFactories$TdsTlsSocketFactory.createSocket(SocketFactories.java:101) at net.sourceforge.jtds.jdbc.SharedSocket.enableEncryption(SharedSocket.java:337) at net.sourceforge.jtds.jdbc.TdsCore.negotiateSSL(TdsCore.java:548) at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:351) ... 52 more {code} h4. Workaround * Switch the Java version used to 1.7 * Turn off SSL * Use Microsoft's JDBC drivers. * Use this patch: http://sourceforge.net/p/jtds/patches/129/

    Atlassian JIRA | 3 years ago | David Chan [Atlassian]
    org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Network error IOException: Connection reset)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. 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()
    2. Commons DBCP
      BasicDataSource.setLogWriter
      1. org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)
      2. org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
      3. org.apache.commons.dbcp.BasicDataSource.setLogWriter(BasicDataSource.java:1134)
      3 frames