Hibernate error with c3p0
I tried adding c3p0 support into one of my hibernate projects, by adding the c3p0 jar file to my classpath and adding the following to my hibernate config file:
<!-- Use the C3P0 connection pool. -->
<property name="c3p0.min_size">3</property>
<property name="c3p0.max_size">10</property>
<property name="c3p0.timeout">1800</property>
However, I kept getting the following error:
org.hibernate.exception.GenericJDBCException: Cannot open connection
After much googling, I found the solution here. All you need to do is comment out the update property in your hibernate config file as follows.
<!--
<property name="hibernate.hbm2ddl.auto">update</property>
-->
I have no idea why this would confuse c3p0, but it does.
Posted by rickg ( Aug 07 2006, 08:59:43 PM PDT ) Permalink Comments [0]

