The moose likes Object Relational Mapping and the fly likes JDBCConnectionException: Cannot open connection Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "JDBCConnectionException: Cannot open connection" Watch "JDBCConnectionException: Cannot open connection" New topic
Author

JDBCConnectionException: Cannot open connection

Kris Reid
Ranch Hand

Joined: Jan 05, 2005
Posts: 247
Hi

Sometimes my application is throwing JDBCConnectionException: Cannot open connection
I can't for the life of me work out why.

It is a web app running on tomcat and using hibernate.
I'm using a session filter that starts the transaction then processes the users action then closes the transaction.
So I don't think that connections are getting left open.

Do I have C3P0 configured properly?
<property name="hibernate.c3p0.acquire_increment">3</property>
<property name="hibernate.c3p0.idle_test_period">14400</property> <!-- seconds -->
<property name="hibernate.c3p0.timeout">25200</property> <!-- seconds -->
<property name="hibernate.c3p0.max_size">100</property>
<property name="hibernate.c3p0.min_size">10</property>
<property name="hibernate.c3p0.max_statements">0</property>


This is the game Mob Warrior if you're interested
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: JDBCConnectionException: Cannot open connection
 
Similar Threads
c3p0 pool size exceeds maxpoolsize
Exception while getting transaction
APPARENT DEADLOCK site goes down please help
.JDBCConnectionException
APPARENT DEADLOCK Hibernate and c3p0 error site goes down please help