亲爱的大家,
我正在tomcat7上使用hibernate-mysql测试一个Struts webApp ...
在 8 小时超时后,我的 webApp 总是崩溃。我在这里和那里更改了配置。但没有成功。
我真的很感谢你的关注...
这里有一些来自hibernate.xml的行
property name="hibernate.bytecode.use_reflection_optimizer">false
property name="hibernate.c3p0.idle_test_period">30
property name="hibernate.c3p0.max_size">600
property name="hibernate.c3p0.max_statements">50
property name="hibernate.c3p0.min_size">5
property name="hibernate.c3p0.timeout">1800
property name="hibernate.c3p0.testConnectionOnCheckout">true
property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider
property name="hibernate.c3p0.validate">true
property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver
property name="hibernate.connection.url">jdbc:mysql://localhost:3306/stockdb?autoReconnect=true
以下是我的堆栈跟踪中的一些行:
com.mchange.v2.c3p0.impl.NewPooledConnection handleThrowable
WARNING: [c3p0] A PooledConnection that has already signalled a Connection error is still in use!
...
WARNING: [c3p0] Another error has occurred [ com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after statement closed. ] which will not be reported to listeners!
...
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after statement closed.
...
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1014)
...
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.getMaxRows(NewProxyPreparedStatement.java:1200)
at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:212)
...
at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:452)
...
请帮忙!