commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vijay Anjur" <vijay.an...@gmail.com>
Subject commons.dbcp
Date Tue, 07 Mar 2006 21:38:18 GMT
I am getting following exception, org.apache.commons.dbcp.SQLNestedException:
Cannot get a connection, pool exhausted - Any ideas?

The sequence to produce the exception is as follows.

Make connection(into connection pool) from an application,Exit the client.

Kill all the connections the client made to the RDBMS (the Pool has). The
pool now has invalid connections.Logging thru the client again to get
connection from pool. Pool validates the dead connection and then trying to
make a new connection throws the following error from factory.makeobject().

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
exhausted

        at org.apache.commons.dbcp.PoolingDataSource.getConnection(
PoolingDataSource.java:103)

        at org.apache.commons.dbcp.BasicDataSource.getConnection(
BasicDataSource.java:540)

        at
org.apache.commons.dbcp.DataSourceConnectionFactory.createConnection(
DataSourceConnectionFactory.java:42)

        at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(
PoolableConnectionFactory.java:290)

        at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(
GenericObjectPool.java:771)

        at org.apache.commons.dbcp.PoolingDataSource.getConnection(
PoolingDataSource.java:95)



 I have set maxActive to 7. and testOnBorrow to true.

Thanks, Vijay

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message