org.hibernate.exception.GenericJDBCException: Cannot open connection

Last Updated : Jun 03, 2026 |
If any of the log file in the folder $POM_HOME/logs or file $CATALINA_HOME/logs/catalina.out has an exception like this :
 org.hibernate.exception.GenericJDBCException: Cannot open connection
...
java.sql.SQLException: Connections could not be acquired from the underlying
database! at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106) at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0Pool
edConnectionPool.java:529) at
com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBac
kedDataSource.java:128) at
org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvide
r.java:56) at
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423) ...
7 more Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A
ResourcePool could not acquire a resource from its primary factory or source. at
com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java
:1319) at
com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourceP
ool.java:557) at
com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.ja
va:477) at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0Pool
edConnectionPool.java:525) ... 10 more

Proposed solution

Procedure

  1. Increase the maximum connections on the database server by changing the max_size property in $POM_HOME/conf/PIMHibernate.cfg.xml :
    <property name="hibernate.hikari.maximumPoolSize">100</property>
  2. Restart the vpms service after changing the maximum connections using the following command:

    service vpms restart

  3. Ensure the database server is running and is accessible from the POM server.