It's not a secret anymore!*
The moose likes Tomcat and the fly likes ResourcePoolException: Attempted to use a closed or broken resource pool Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "ResourcePoolException: Attempted to use a closed or broken resource pool" Watch "ResourcePoolException: Attempted to use a closed or broken resource pool" New topic
Author

ResourcePoolException: Attempted to use a closed or broken resource pool

Prakash Mani - Attur
Ranch Hand

Joined: Oct 08, 2009
Posts: 100
When hibernate tries to build the session factory, I am getting the below exception. Can you guys help me to overcome this issue ? With the same config file i can able to launch app in the local environment but not in the production. This issue happened after the latest deployment.

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16250
    
  21

I don't think that Tomcat can help with that. It appears to be a Hibernate problem that just happens to appear in the context of the production (Tomcat) machine.

Generally the first thing you should do is make sure that the proper JDBC driver is installed in TOMCAT_HOME/lib. Followed by a check to ensure that no firewall is blocking connection from the Tomcat machine to the database machine.

You should check the catalina.out and localhost logfiles to make sure that there are no error messages coming from the connection pooler itself.

Of course, I'm assuming that you are using a Tomcat-managed connection pool and not simply providing the pool as part of the webapp itself. Since that's what you should be doing.


Customer surveys are for companies who didn't pay proper attention to begin with.
Prakash Mani - Attur
Ranch Hand

Joined: Oct 08, 2009
Posts: 100
Thanks Tim...Found the reason for the exception...Its actually the McAfee denying the permission to connect with the database server...When changed the log level for hibernate package to INFO, I was able to see the exception clearly as "Permission Denied".Thanks again...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: ResourcePoolException: Attempted to use a closed or broken resource pool