异常:
2013-1-28 16:27:43 org.apache.catalina.core.StandardContext reload
信息: Reloading this Context has started
2013-1-28 16:28:00 org.apache.coyote.http11.Http11AprProtocol pause
信息: Pausing Coyote HTTP/1.1 on http-8080
2013-1-28 16:28:00 org.apache.coyote.ajp.AjpAprProtocol pause
信息: Pausing Coyote AJP/1.3 on ajp-8009
2013-1-28 16:28:01 org.apache.catalina.core.StandardService stop
信息: Stopping service Catalina
java.lang.RuntimeException : java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.InterruptedException
at util.C3P0Util.getConnection( C3P0Util.java:51)
at dao.BaseDAO.getConnection( BaseDAO.java:11)
at dao.impl.PlatformUserInfoDAOImpl.updatePlatformUserLoginInfo(PlatformUserInfoDAOImpl.java:268)
at action.ServerStartAction.contextDestroyed(ServerStartAction.java:31)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4211)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4846)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3422)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:426)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1357)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1649)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1658)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1658)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1638)
at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.InterruptedException
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.checkoutPooledConnection(C3P0PooledConnectionPool.java:531)
at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
at util.C3P0Util.getConnection( C3P0Util.java:46)
... 13 more
Caused by: java.lang.InterruptedException
at java.lang.Object.wait( Native Method)
at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1315)
at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557)
at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)
... 15 more
发生的情境:
后台一直有定时器在那边跑,而定时器一直在链接数据库查询,每隔30秒拿出链接,可能跟这个与关系。
scheduExec.scheduleWithFixedDelay(thread, 0, 1000*30, TimeUnit.MILLISECONDS);