aspose file tools*
The moose likes Tomcat and the fly likes GenericJDBCException: Cannot open connection error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "GenericJDBCException: Cannot open connection error" Watch "GenericJDBCException: Cannot open connection error" New topic
Author

GenericJDBCException: Cannot open connection error

Gokulnath Kuppuswamy
Greenhorn

Joined: Mar 08, 2012
Posts: 2
Hi,

In one of our Tomcat Apache server version 6, below errors were logged in the log file and we were not able to login to the application. Once we restarted the tomcat apache service then it was working fine. This issue occurs occationally.

02 Mar 2012 12:06:05:131 [WARN] SQL Error: 0, SQLState: null
02 Mar 2012 12:06:05:131 [ERROR] An attempt by a client to checkout a Connection has timed out.

02 Mar 2012 12:48:29:014 [ERROR] Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection

Kindly let me know any solutions if we can resolve the issue without restart of tomcat apache service.

Regards,
Gokul
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15641
    
  15

Welcome to the JavaRanch, Gokul!

Can show us your DB Connection Pool configuration? One problem with connection pools is that idle connections may time out and become useless. There are pool options that can be set for many databases that help to get around that.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: GenericJDBCException: Cannot open connection error
 
Similar Threads
Has anyone been successful in integrating mod_webapp with Apache2+Tomcat4 on RedHat 7
How to get aroun LazyInitialization exceptions using Spring HibernateDaoSupport?
SSL on Tomcat -- No, not your typical question!
Running Tomcat from Eclipse