This is driving me crazy. Especially since I cannot seem to find any info
about the problem on Google.
Here is the deal, I have set up Hibernate and as long as I use its built in
JDBC connection pooling, everything works fine. However, as soon as I try
and use c3p0, nothing works. I have a JUnit test class that tests my
PersistenceDAO against a live MySQL 4.x database. Basically, it tries to
insert, update, delete a bunch of objects to make sure that Hibernate is
working correctly. This works fine, all tests pass, if I don't use c3p0. As
soon as I turn it on, not a single test passes. I have no idea what is going
on here. In an attempt to answer as many questions as possible, please see
below:
IDE: NetBeans 5.0
Hibernate: version 3.1 using the library version that come bundled with it.
c3p0: version c3p0-0.9.0.jar (I have tried the latest version as well,didn't work)
MySQL: version 4.1.20 running on CentOS 4.3
JDBC: mysql-connector-java-3.1.12-bin.jar
Below are my hibernate config file and, as far as I can tell, the important
parts from the stack trace. As you can see from the config file, I am using
what is more or less a default use of c3p0, but nothing is working. Below
everything, I have also included the source code from one of the methods
from my PersistenceDao class in case the problem is in the code.
Thanks for the help with this,
Chris
hibernate.cfg.xml
The stacktrace
PersistenceDao method
[ July 03, 2006: Message edited by: Chris Johnston ]
[ July 03, 2006: Message edited by: Chris Johnston ]