Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#21 ERROR: Connections could not be acquired

closed
nobody
None
5
2006-09-07
2006-02-18
Anonymous
No

Hi,

I am getting the following error when using c3p0-
0.9.0.jar.
<< Connections could not be acquired from the
underlying database! >>

Any idea as why this may be happening? Oh, by the way,
I am using with Hibernate 3.1.

Below are my connection pool configuration and
complete Stack Trace. Any help is greately
appreciated.

CONNECTION POOL CONFIGURATION

cache.use_query_cache = true
cache.use_second_level_cache = true
connection.driver_class =
oracle.jdbc.driver.OracleDriver
connection.url = jdbc:oracle:thin:@pcg:1521:RNP01
connection.username = rosettaapl2
connection.password = oyuxay1f

c3p0.min_size = 1
c3p0.max_size = 5
c3p0.acquire_increment = 1
c3p0.idle_test_period = 180
c3p0.timeout = 300

show_sql = false
dialect = org.hibernate.dialect.Oracle9Dialect
hibernate.current_session_context_class = thread
==================

COMPLETE STACK TRACE:

at
SOAP.ProcessDefinitions.SyncOrderEntry.SyncOrderEntryRe
quest.SyncOrderEntryRequestProcessOrderEntry.invoke
(SyncOrderEntryRequestPro
cessOrderEntry.java:100)
at sun.reflect.NativeMethodAccessorImpl.invoke0
(Native Method)
7)
at
SOAP.ProcessDefinitions.SyncOrderEntry.SyncOrderEntryRe
quest.SyncOrderEntryRequestProcessOrderEntry.invoke
(SyncOrderEntryRequestPro
cessOrderEntry.java:100)
at sun.reflect.NativeMethodAccessorImpl.invoke0
(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke
(Method.java:324)
at com.tibco.plugin.java.JavaActivity.eval
(JavaActivity.java:393)
at com.tibco.pe.plugin.Activity.eval
(Activity.java:209)
at com.tibco.pe.core.TaskImpl.eval
(TaskImpl.java:399)
at com.tibco.pe.core.Job.a(Job.java:591)
at com.tibco.pe.core.Job.if(Job.java:443)
at com.tibco.pe.core.JobDispatcher$a.a
(JobDispatcher.java:270)
at com.tibco.pe.core.JobDispatcher$a.run
(JobDispatcher.java:218)
Caused by: java.sql.SQLException: Connections could
not be acquired from the underlying database!
at com.mchange.v2.sql.SqlUtils.toSQLException
(SqlUtils.java:104)
at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.check
outPooledConnection(C3P0PooledConnectionPool.java:236)
at
com.mchange.v2.c3p0.PoolBackedDataSource.getConnection
(PoolBackedDataSource.java:94)
at
org.hibernate.connection.C3P0ConnectionProvider.getConn
ection(C3P0ConnectionProvider.java:35)
at
org.hibernate.jdbc.ConnectionManager.openConnection
(ConnectionManager.java:315)
... 33 more
Caused by:
com.mchange.v2.resourcepool.CannotAcquireResourceExcept
ion: A ResourcePool could not acquire a resource from
its primary factory or
source.
at
com.mchange.v2.resourcepool.BasicResourcePool.awaitAcqu
ire(BasicResourcePool.java:970)
at
com.mchange.v2.resourcepool.BasicResourcePool.checkoutR
esource(BasicResourcePool.java:208)
at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.check
outPooledConnection(C3P0PooledConnectionPool.java:232)
==================

Discussion

  • Steve Waldman
    Steve Waldman
    2006-09-07

    • status: open --> closed
     
  • Steve Waldman
    Steve Waldman
    2006-09-07

    Logged In: YES
    user_id=175530

    Sorry this is so long unaddressed. You probably took care of
    this years ago.

    Well, straightforwardly, c3p0 is trying and failing to get
    Connections from your database. You should have seen a
    message logged by
    com.mchange.v2.resourcepool.BasicResourcePool at WARNING
    level including the Exception c3p0 observed while trying to
    communicate with the database, prior to observing the
    Exception above. Any such exception? The most likely cause
    of something like this is a misconfiguration of database
    connectio params, or the database or network going down.