Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

java.sql.SQLException: Pool connect failed: None available

47 views
Skip to first unread message

Siddharth Baidwan

unread,
Apr 22, 2001, 12:54:01 AM4/22/01
to

Hi,

We are using:
WLS 5.1 SP_9 on Solaris 2.6
Oracle 8.1.6 DB

DB pooled coonections (weblogic.properties):
weblogic.jdbc.connectionPool.mercury_oracle_pool=\
url=jdbc20:weblogic:oracle,\
driver=weblogic.jdbc20.oci.Driver,\
loginDelaySecs=1,\
initialCapacity=4,\
maxCapacity=10,\
capacityIncrement=2,\
allowShrinking=true,\
shrinkPeriodMins=15,\
refreshMinutes=10,\
testTable=dual,\
props=user=<ora_user>password=<ora_password>;server=SERVER_NAME

weblogic.jdbc.TXDataSource.mercury_oracle_pool=mercury_oracle_pool

We use both continer-manager-persistence entity beans and db access via JDBC (using
the above pooled connection).

Our JDBC access is via:
instInitCtx = new InitialContext();
DataSource instDataSource = (javax.sql.DataSource) instInitCtx.lookup(m_sMercuryPool);
Connection instConn = instDataSource.getConnection();

After each use of the JDBC poole we cleanup via:
Statement.close()
COnnection.close()

After running the server for 10-15 minutes, during which it does a few hundred
transaction it sudenly stops; giving the error message (jdbc.log):
Executing: SELECT SYSDATE FROM DUAL
java.sql.SQLException: Pool connect failed: None available
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.<init>(Throwable.java:94)
at java.lang.Exception.<init>(Exception.java:42)
at java.sql.SQLException.<init>(SQLException.java:82)
at weblogic.jdbcbase.pool.Driver.connect(Driver.java:184)
at weblogic.jdbcbase.jts.Driver.connect(Driver.java:233)
at weblogic.jdbc20.common.internal.RmiDataSource.getConnection(RmiDataSource.java:55)
at weblogic.jdbc20.common.internal.RmiDataSource_ServiceStub.getConnection(RmiDataSource_ServiceStub.java:179)
at mercury.infrastructure.dbconnector.DBConnector.getConnection(DBConnector.java:60)

ANY IDEAS/CLUES


Cheers,
Sid

THorner

unread,
Apr 23, 2001, 4:55:46 AM4/23/01
to
It sounds like either all 10 of the connections are being used at the
same time, and the request for the next connection times out, or that
the pool doesn't reach 10 connections in size, and a request for a
connection times out before the connection is created.

Try looking at what is happening to the pool size in the console.

Is there any way around the connection.close() statement in the code,
for instance in the following

try{
//blah blah, initialise connection etc
con.close();
}catch (SQlException e){
//blah
}

if there is an SQLException in the main body of the code the connection
won't be closed, if con.close() was in a 'finally' then this problem
wouldn't arise

terry

0 new messages