title: org.springframework.jdbc.UncategorizedSQLException:
body: <pre><code>org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Cannot open connection; uncategorized SQLException for SQL [???]; SQL state [null]; error code [0]; Connections could not be acquired from the underlying database!; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!
      at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
      at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
      at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
      at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424)
      at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:410)
      at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:424)
      at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
      at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:921)
      at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:913)
      at dao.daoImpl.FaxDaoImpl.getOutBoundFaxes(FaxDaoImpl.java:94)
      at faxUpload.SecureBatchFaxFileUpload.main(SecureBatchFaxFileUpload.java:75)
  Caused by: 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(C3P0PooledConnectionPool.java:529)
      at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
      at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:82)
      at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:417)
      at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
      at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105)
      at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561)
      at org.hibernate.loader.Loader.doQuery(Loader.java:661)
      at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
      at org.hibernate.loader.Loader.doList(Loader.java:2145)
      at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
      at org.hibernate.loader.Loader.list(Loader.java:2024)
      at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
      at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308)
      at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)
      at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1106)
      at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
      at org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:930)
      at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419)
      ... 5 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(BasicResourcePool.java:557)
      at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477)
      at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)
      ... 23 more
  </code></pre>
  
  <p>i am running a  project in  spring and hibernate,using my sql  with  c3p00l property.this is my c3pool settting</p>
  
  <pre><code>   &lt;bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"&gt;
    &lt;!--  &lt;bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"&gt;
       &lt;bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" &gt;  --&gt;
          &lt;property name="driverClass"&gt;&lt;value&gt;${jdbc.driverClassName}&lt;/value&gt;&lt;/property&gt; 
          &lt;property name="jdbcUrl"&gt;&lt;value&gt;${jdbc.url}&lt;/value&gt;&lt;/property&gt;
          &lt;property name="user"&gt;&lt;value&gt;${jdbc.username}&lt;/value&gt;&lt;/property&gt;
          &lt;property name="password"&gt;&lt;value&gt;${jdbc.password}&lt;/value&gt;&lt;/property&gt;
  
  
          &lt;/bean&gt;
  </code></pre>
  
  <p>some times i am getting this exception.is this is because of my c3pool setting.any help will be appreciated</p>