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:
-
The database is down, possibly due to being overwhelmed.
-
The Application Server cannot reach the Database.
-
Your username and password that you used for your database in
confluence_home/confluence.cfg.xml
is incorrect.
-
There are not enough JDBC connections available during the upgrade process.
Resolution
-
Check that your database is up and running. If the problem has happened after a period of Confluence usage, check to make sure the database indices are installed correctly.
-
Find out why your Confluence server cannot establish a connection to the database.
-
Check that your username and password for your database is correct and hasn't been changed. This is configured in confluence.cfg.xml.
-
Check your DB connection pool settings. See
Confluence slows and times out during periods of high load due to database connection pool
.