如何在hibernate

时间:2015-07-27 07:15:59

标签: java spring hibernate

在我的项目中,我为hibernate配置了c3po连接池。为此,我添加了两个名为c3p0-0.9.1.jar的jar文件和hibernate-c3po-3.32.jar.Below是我的hibernate.cfg。

 <property name="hibernate.connection.autoReconnect">true</property>
        <property name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
        <property name="hibernate.c3p0.acquire_increment">3</property>
        <property name="hibernate.c3p0.idle_test_period">300</property>
        <property name="hibernate.c3p0.min_size">15</property>
        <property name="hibernate.c3p0.max_size">120</property>
        <property name="hibernate.c3p0.max_statements">150</property>
        <property name="hibernate.c3p0.timeout">25200</property>
        <property name="hibernate.c3p0.preferredTestQuery">select 1</property>
        <property name="hibernate.c3p0.testConnectionOnCheckout">true</property>

Can't overwrite cause with java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already.  Could not load com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.

内存泄漏的原因是:The web application [name] registered the JDBC driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. 它不会影响我的应用程序。如何解决此异常。

任何帮助将不胜感激!!!!

0 个答案:

没有答案