Meaningless Drivel is fun!
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

GenericJDBCException: Cannot open connection error

Gokulnath Kuppuswamy

Joined: Mar 08, 2012
Posts: 2

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.

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

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.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: GenericJDBCException: Cannot open connection error
jQuery in Action, 3rd edition