Hibernate – Could not find C3P0ConnectionProvider
Problem
Configured Hibernate to use “c3p0” connection pool, but hits following warning :
//...
2011-04-25_12:18:37.190 WARN o.h.c.ConnectionProviderFactory -
c3p0 properties is specificed, but could not find
org.hibernate.connection.C3P0ConnectionProvider from the classpath,
these properties are going to be ignored.
2011-04-25_12:18:37.191 INFO o.h.c.DriverManagerConnectionProvider -
Using Hibernate built-in connection pool (not for production use!)
//...
Look like “org.hibernate.connection.C3P0ConnectionProvider
” is missing?
Solution
Since Hibernate v3.3 (if not mistaken), the “C3P0ConnectionProvider” is moved to another jar file “hibernate-c3p0.jar“. You need to include it, in order to make Hibernate supports c3p0 connection pool.
You can download the “hibernate-c3p0.jar” from JBoss public repository.
File : pom.xml
<project ...>
<repositories>
<repository>
<id>JBoss repository</id>
<url>http://repository.jboss.org/nexus/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<!-- Hibernate c3p0 connection pool -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-c3p0</artifactId>
<version>3.6.3.Final</version>
</dependency>
</dependencies>
</project>
Note
See this detail guide – “How to configure c3p0 connection pool in Hibernate“.
See this detail guide – “How to configure c3p0 connection pool in Hibernate“.
Reference
About Author
Comments
Subscribe
0 Comments