aspose file tools
The moose likes JDBC and the fly likes database connection pooling (dbcp) - help required Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "database connection pooling (dbcp) - help required" Watch "database connection pooling (dbcp) - help required" New topic
Author

database connection pooling (dbcp) - help required

Nomi Malo
Greenhorn

Joined: Mar 20, 2007
Posts: 20
Hi,
In our application we are getting db connection pooling (dbcp) exceptions. These are as follows:

Cause: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:124)
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:322)
at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:212)
at org.springframework.orm.ibatis.SqlMapClientTemplate.executeWithListResult(SqlMapClientTemplate.java:249)
at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapClientTemplate.java:296)

We are using ibatis,mysql and tomcat server. The server.xml has the following dbcp settings

<Resource name="jdbc/margarita"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/margarita?autoReconnect=true"
username="assured"
password="labor4u"
maxActive="60"
maxIdle="3"
maxWait="2000"
removeAbandoned="true"
logAbandoned="true"
removeAbandonedTimeout="60"
type="javax.sql.DataSource"/>

The logAbondoned was added recently and now we are getting different exception which relates to resultset and also mentions about a resultmap (used in ibatis)

--- The error happened while setting a property on the result object.
--- Cause: java.sql.SQLException: Operation not allowed after ResultSet closed

Today, we have also increased maxActive but not sure if that would completely fix the problem.

Any help regarding this db pooling problem would be highly appreciated. Thanks
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: database connection pooling (dbcp) - help required
 
Similar Threads
Cannot get a connection, pool error Timeout waiting for idle object
DBCP issue - Timeout waiting for idle object
Application hosted on Tomcat has datasource DBCP issues
DB Connection pooling problem
~~ Newbie question - database ~~