Confluence won't start due to GenericJDBCException Cannot open connection

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

Confluence Data Center is unable to start. It can't connect to the database.

Check the database connection

  1. Verify that your database is up and running. If the problem happened after a period of Confluence usage, check to make sure the database indices are installed correctly.

  2. Find out why your Confluence server can't establish a connection to the database.

  3. Check that your username and password for your database is correct and hasn't been changed. This is configured in confluence.cfg.xml.

  4. Check your DB connection pool settings. See Confluence slows and times out during periods of high load due to database connection pool.

Error log detail

The following appears in the atlassian-confluence.log file

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 org.springframework.transaction.CannotCreateTransactionException: Could not create Hibernate transaction; nested exception is net.sf.hibernate.exception.GenericJDBCException: Cannot open connection net.sf.hibernate.exception.GenericJDBCException: Cannot open connection at net.sf.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:80) at net.sf.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:69) at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29) .... .... Caused by: java.sql.SQLException: An SQLException was provoked by the following failure: com.mchange.v2.resourcepool.ResourcePoolException: A ResourcePool could not acquire a resource from its primary factory or source. at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:68) at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:57) at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:213) at com.mchange.v2.c3p0.PoolBackedDataSource.getConnection(PoolBackedDataSource.java:64) at net.sf.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:33) at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:292) ... 63 more Caused by: com.mchange.v2.resourcepool.ResourcePoolException: A ResourcePool could not acquire a resource from its primary factory or source. at com.mchange.v2.resourcepool.BasicResourcePool.awaitAcquire(BasicResourcePool.java:870) at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:201) at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:209) ... 66 more

Cause

This error is stating that Confluence cannot get a connection to the database.

Some possible causes are:

  1. The database is down, possibly due to too many requests for the server to handle.

  2. The Application Server cannot reach the Database.

  3. Your username and password that you used for your database in confluence_home/confluence.cfg.xml is incorrect.

  4. There are not enough JDBC connections available during the upgrade process.

Updated on April 16, 2025

Still need help?

The Atlassian Community is here for you.