troubleshooting Question

Tomcat and java.sql.SQLException: Connection is closed Exception.

Avatar of salilsharma72
salilsharma72 asked on
JavaJava EE
6 Comments1 Solution3060 ViewsLast Modified:
I am using Apache-Tomcat integration using mod_jk2 and using common DBCP for the database connection pool. I am running a java application on the Tomcat server. Apache server just routes request to Tomcat. All application code runs on Tomcat server. It runs fine for couple of day but after that my application stops responding to any requests. This means that when I try to access servlet on my application, it takes forever to process the request which never comes back. I see following errors in my custom logs

ConnectionBean.releaseConnection Error: java.sql.SQLException: Connection is closed.

My data source properties for commons DB CP are
JdBC Driver Class = oracle.jdbc.driver.OracleDriver
Maximum Active Connection = 20
Maximum Idle connection = 10
Max wait for Connection = -1

I have made sure than I am closing a connection after opening it. Could you please advise what could be wrong? Is it a configuration issue or coding issue?
Please help.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros