4
我得到以下警告:休眠:C3P0性能忽略
15:41:51,043 WARN [org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator] (MSC service thread 1-1) HHH000022: c3p0 properties were encountered, but the org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider provider class was not found on the classpath; these properties are going to be ignored.
這裏是爲我Hibernate.xfg.xml設置的屬性:
<property name="hibernate.c3p0.min_size">50</property>
<property name="hibernate.c3p0.max_size">200</property>
... (and other properties)
我沒有任何除了上述屬性之外,關於C3P0的其他配置。
這裏都是我的Hibernate和C3P0依賴在Maven pom.xml的配置:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.2.4.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.3.1.Final</version>
</dependency>
<dependency>
<groupId>c3p0</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.1.2</version>
</dependency>
我所需要的,以便能夠讀取,在目前被忽略的屬性呢?
我添加它使用的版本。但仍然得到相同的問題... – user1883212
@ user1883212在這種情況下看到這個[答案](http://stackoverflow.com/questions/16277130/i-can-not-run-c3p0connectionprovider#16386038) – Reimeus
好吧,我補充說提供者類的解釋,但現在我得到:引起:java.lang.ClassNotFoundException:無法加載請求的類:org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider – user1883212