Warning: c3p0 properties were encountered, but the c3p0 provider class was not found on the classpath

Viewed 1515

I am getting this warning when i try to use c3p0:

2018-08-25 21:11:20,376 WARN [main] (org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator:219) - HHH000022: c3p0 properties were encountered, but the c3p0 provider class was not found on the classpath; these properties are going to be ignored.

I found similar post to this but they were for older versions of hibernate and most them point to a library problem, that doens't seem to be my problem since i only use one library for hibernate and my code runs despite the warning. Problem is that, without c3p0, it runs on hibernate connection pool.

My gradle file pulls this library's for SQL and hibernate:

compile group: 'com.microsoft.sqlserver', name: 'mssql-jdbc', version: '6.2.1.jre8'
compile group: 'org.hibernate', name: 'hibernate-c3p0', version: '5.3.5.Final'

and my hibernate configuration file hybernate.clg.xml:

<property name="hibernate.connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property>
    <property name="hibernate.connection.url">
        jdbc:sqlserver:...
    </property>

    <property name="hibernate.c3p0.acquire_increment">1</property>
    <property name="hibernate.c3p0.idle_test_period">60</property>
    <property name="hibernate.c3p0.min_size">1</property>
    <property name="hibernate.c3p0.max_size">2</property>
    <property name="hibernate.c3p0.max_statements">50</property>
    <property name="hibernate.c3p0.timeout">0</property>
    <property name="hibernate.c3p0.acquireRetryAttempts">1</property>
    <property name="hibernate.c3p0.acquireRetryDelay">250</property>

    <property name="hibernate.current_session_context_class">thread</property>
    <property name="hibernate.show_sql">true</property>
    <property name="hibernate.dialect">org.hibernate.dialect.SQLServer2012Dialect</property>
0 Answers
Related