关于网友提出的“ ssh项目 服务器启动一会后就会报错 ,将hibernate连接数改成30000就好了”问题疑问,本网通过在网上对“ ssh项目 服务器启动一会后就会报错 ,将hibernate连接数改成30000就好了”有关的相关答案进行了整理,供用户进行参考,详细问题解答如下:
问题: ssh项目 服务器启动一会后就会报错 ,将hibernate连接数改成30000就好了
描述:hibernatec3p0javassh
11Processor.java:1023)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
AbstractProtocol.java:589)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoin
t.java:1852)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:918)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.sql.SQLException: An SQLException was provoked by the following
failure: com.mchange.v2.resourcepool.ResourcePoolException: Attempted to use a c
losed or broken resource pool
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65)
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:62)
/>
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConne
ction(C3P0PooledConnectionPool.java:531)
at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(A
bstractPoolBackedDataSource.java:128)
at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.
getConnection(LocalDataSourceConnectionProvider.java:81)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager
.java:446)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.
java:167)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatc
her.java:161)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1577)
at org.hibernate.loader.Loader.doQuery(Loader.java:696)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Lo
ader.java:259)
at org.hibernate.loader.Loader.doList(Loader.java:2232)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2129)
at org.hibernate.loader.Loader.list(Loader.java:2124)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.ja
va:363)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java
:196)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1149)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate
(HibernateTemplate.java:921)
at org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate
(HibernateTemplate.java:1)
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(Hibern
ateTemplate.java:406)
... 78 more
Caused by: com.mchange.v2.resourcepool.ResourcePoolException: Attempted to use a
closed or broken resource pool
at com.mchange.v2.resourcepool.BasicResourcePool.ensureNotBroken(BasicRe
sourcePool.java:1632)
at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(
BasicResourcePool.java:524)
/>
at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicR
/>
esourcePool.java:477)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConne
ction(C3P0PooledConnectionPool.java:525)
... 97 more
2014-04-23 16:05:31,695 WARN [org.hibernate.util.JDBCExceptionReporter] - SQL Er
ror: 0, SQLState: null
2014-04-23 16:05:31,695 ERROR [org.hibernate.util.JDBCExceptionReporter] - An SQ
LException was provoked by the following failure: com.mchange.v2.resourcepool.Re
sourcePoolException: Attempted to use a closed or broken resource pool
2014-04-23 16:05:31,695 WARN [org.hibernate.util.JDBCExceptionReporter] - SQL Er
ror: 0, SQLState: null
2014-04-23 16:05:31,695 ERROR [org.hibernate.util.JDBCExceptionReporter] - An SQ
LException was provoked by the following failure: com.mchange.v2.resourcepool.Re
sourcePoolException: Attempted to use a closed or broken resource pool
2014-04-23 16:05:31,695 ERROR [org.apache.struts2.dispatcher.Dispatcher] - Excep
tion occurred during processing request: Hibernate operation: Cannot open connec
tion; uncategorized SQLException for SQL [???]; SQL state [null]; error code [0]
; An SQLException was provoked by the following failure: com.mchange.v2.resource
pool.ResourcePoolException: Attempted to use a closed or broken resource pool; n
ested exception is java.sql.SQLException: An SQLException was provoked by the fo
llowing failure: com.mchange.v2.resourcepool.ResourcePoolException: Attempted to