tags:

views:

513

answers:

1

I am running an application on Weblogic 9.2 MP3, currently having problem with connection pool.

ERROR - UserBean retrieving user record. weblogic.jdbc.extensions.PoolLimitSQLException: 
weblogic.common.resourcepool.ResourceLimitException: No resources currently available in pool MyApp Data Source to allocate to applications, please increase the size of the pool and retry..

I also kept getting below error message, saying "Method not supported : Statement.cancel()" which I think it is the cause to the error above.

<Error> <JDBC> <BEA-001131> <Received an exception when closing a cached statement for the pool "MyApp Data Source": java.sql.SQLException: Method not supported : Statement.cancel()..>

I went through the app source code, this method didn't seem to be used by the app at all. Just though it might be something to do with weblogic itself.

Anyone have any idea to fix this error?

A: 

Firstly, I'd make sure that I was closing every java.sql.Connection variable.

e.g.

final Connection connection = dataSource.getConnection();

// do your database work here

if (connection != null) {
    connection.close();
}

You could probably make it even tighter by putting connection.close(); into the finally part of a try/catch block.

Neil McKeown