Yes, I know, this is a Hibernate forum and not a c3p0 forum, but I figured that enough of you are using c3p0 that you might have some insight into a problem that's occurring. I've posted the issue to the c3p0-users mailing list, but so far I haven't had any luck figuring it out.
Anyway, as I'm sure you can tell by now, I'm using c3p0 for connection pooling in Hibernate. We're hoping to use Hibernate as the persistence layer in the next version of our application under Tomcat. However, we're having a problem that we've been unable to diagnose.
After Hibernate has been up and running for a while we'll start to see the following exception:
Code:
java.lang.NoClassDefFoundError: com/mchange/v2/resourcepool/BasicResourcePool$5
at com.mchange.v2.resourcepool.BasicResourcePool.destroyResource(BasicResourcePool.java:476)
at com.mchange.v2.resourcepool.BasicResourcePool.removeResource(BasicResourcePool.java:736)
at com.mchange.v2.resourcepool.BasicResourcePool.cullExpiredAndUnused(BasicResourcePool.java:772)
at com.mchange.v2.resourcepool.BasicResourcePool.access$200(BasicResourcePool.java:34)
at com.mchange.v2.resourcepool.BasicResourcePool$CullTask.run(BasicResourcePool.java:940)
at java.util.TimerThread.mainLoop(Timer.java:432)
at java.util.TimerThread.run(Timer.java:382)
and a lot of the following errors:
Code:
WebappClassLoader: Lifecycle error : CL stopped
We have the c3p0 connection pools configured in the hibernate.cfg.xml file as follows:
Code:
<property name="c3p0.max_size">10</property>
<property name="c3p0.min_size">2</property>
<property name="c3p0.timeout">600</property>
<property name="c3p0.validate">true</property>
<property name="c3p0.max_statements">100</property>
The class being referenced, BasicResourcePool$5, does indeed exist in the c3p0 jar file. We're using the jar file that comes packaged with the Hibernate download.
Any ideas?
-Matt