title: C3P0 won't start configured in Hibernate properties with Spring?
body: <p>I'm using Hibernate 3.3.1GA and Spring 3.0.2 (and Maven from eclipse). I added c3p0-0.9.1 jar to classpath, and first tried this approach (configuring c3p0 within datasource bean):</p>
  
  <pre><code>&lt;bean id="dataSource2" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"&gt;
      &lt;property name="driverClass" value="${ora.driverClassName}" /&gt;
      &lt;property name="jdbcUrl" value="${ora.url}" /&gt;
      &lt;property name="user" value="${ora.username}" /&gt;
      &lt;property name="password" value="${ora.password}" /&gt;
  
      &lt;property name="minPoolSize" value="${minPoolSize}" /&gt;
      &lt;property name="maxPoolSize" value="${maxPoolSize}" /&gt;
      &lt;property name="maxIdleTime" value="${maxIdleTime}" /&gt;
      &lt;property name="maxStatements" value="${maxStatements}" /&gt;
      &lt;property name="acquireIncrement" value="${acquireIncrement}" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>This seems to <strong>work</strong>, as I can see c3p0 log in the eclipse console.<br>
  However, when I tried configuring it within hibernate sessionFactory properties, like this:</p>
  
  <pre><code>&lt;bean id="sessionFactory2" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean" name="sessionFactory2"&gt;
      &lt;property name="dataSource" ref="dataSource2" /&gt;
      &lt;property name="hibernateProperties"&gt;
          &lt;props&gt;
              &lt;prop key="hibernate.dialect"&gt;org.hibernate.dialect.Oracle10gDialect&lt;/prop&gt;
              &lt;prop key="hibernate.show_sql"&gt;true&lt;/prop&gt;
              &lt;prop key="hibernate.format_sql"&gt;true&lt;/prop&gt;
              &lt;prop key="hibernate.query.substitutions"&gt;true 1, false 0&lt;/prop&gt;
  
              &lt;!-- C3P0 properties (hibernate.c3p0.idle_test_period)  --&gt;
              &lt;prop key="hibernate.connection.provider_class"&gt;org.hibernate.connection.C3P0ConnectionProvider&lt;/prop&gt;
              &lt;prop key="hibernate.c3p0.min_size"&gt;1&lt;/prop&gt;
              &lt;prop key="hibernate.c3p0.max_size"&gt;20&lt;/prop&gt;
              &lt;prop key="hibernate.c3p0.timeout"&gt;600&lt;/prop&gt;
              &lt;prop key="hibernate.c3p0.acquire_increment"&gt;1&lt;/prop&gt;
              &lt;prop key="hibernate.c3p0.max_statements"&gt;50&lt;/prop&gt;
  
          &lt;/props&gt;
      &lt;/property&gt;
      &lt;property name="mappingResources"&gt;
          &lt;list&gt;
                       ...
          &lt;/list&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>this <strong>doesn't work</strong>, c3p0 just won't start, no output, no error, nothing...<br>
  Actually, I don't find it so strange , because when I opened hibernate-core-3.3.1.GA jar from Maven repository, I couldn't find <em>org.hibernate.connection.C3P0ConnectionProvider</em> class. I tried some other versions of hibernate (3.3.2, 3.6.0), and still same thing was happening (no C3P0ConnectionProvider class was in jar file). I treid removing <em>connection.providerclass</em> property, no difference.</p>
  
  <p>I read a ton of related questions here and on other forums, and I can't really understand what's the problem. <a href="https://stackoverflow.com/questions/4303988/hibernate-3-3-and-c3p0">This</a> is basically my problem, but I didn't find it useful. Am I missing something in the properties configuration, did I name them wrong or something?  </p>
  
  <p>Thanks.</p>