This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes database connection pooling (dbcp) - help required Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
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
 
Don't get me started about those stupid light bulbs.
 
subject: database connection pooling (dbcp) - help required
 
Similar Threads
DB Connection pooling problem
Cannot get a connection, pool error Timeout waiting for idle object
Application hosted on Tomcat has datasource DBCP issues
DBCP issue - Timeout waiting for idle object
~~ Newbie question - database ~~