SpringMVC+Hibernate搭建的项目中出现连接池被占满整问题??
SpringMVC+Hibernate搭建的项目中出现连接池被占满整个程序死掉啦!我google了好久还是不知道具体怎么搞!!有那为知道啊?帮忙解决一下啊?
------解决方案--------------------下面是错误信息……
[2012-09-17.20:52:57]WARN - [org.hibernate.util.
JDBCExceptionReporter:line 77]SQL Error: 0, SQLState: null
[2012-09-17.20:52:57]ERROR - [org.hibernate.util.JDBCExceptionReporter:line 78]An attempt by a client to checkout a Connection has timed out.
[2012-09-17.20:52:57]WARN - [org.hibernate.util.JDBCExceptionReporter:line 77]SQL Error: 0, SQLState: null
[2012-09-17.20:52:57]ERROR - [org.hibernate.util.JDBCExceptionReporter:line 78]An attempt by a client to checkout a Connection has timed out.
[2012-09-17.20:52:57]ERROR - [org.springframework.scheduling.support.MethodInvokingRunnable:line 68]Invocation of method 'doTimerSchedule' on target class [class common.Timer.JobSchedule] failed
org.hibernate.exception.GenericJDBCException: Cannot open connection
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:426)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:140)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1551)
at org.hibernate.loader.Loader.doQuery(Loader.java:673)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2217)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2108)
at org.hibernate.loader.Loader.list(Loader.java:2103)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:340)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1122)
at
org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:811)
at common.baseclass.CommonDAO.get(CommonDAO.java:218)
at common.baseclass.CommonComponentsDAO.getDeductStorage(CommonComponentsDAO.java:1101)
at common.baseclass.CommonComponentsDAO.selectOrderInfor(CommonComponentsDAO.java:998)
at common.Timer.JobSchedule.doTimerSchedule(JobSchedule.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:273)
at org.springframework.scheduling.support.MethodInvokingRunnable.run(MethodInvokingRunnable.java:65)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:51)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)