日期:2014-05-17  浏览次数:20840 次

连接池问题....高手请进
日志:
java.util.NoSuchElementException:   Timeout   waiting   for   idle   object
at   org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:801)
at   org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:140)
at   org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)
at   DBManager.DBManager.getDB_Connection(DBManager.java:21)
at   DBManager.DBManager.getDB_returnArrayListSelect(DBManager.java:62)
at   com.yourcompany.struts.action.IsWhichWebAction.execute(IsWhichWebAction.java:69)
at   org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at   org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at   org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at   org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at   javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at   org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:425)
at   org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:452)
at   org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1285)
at   java.lang.Thread.run(Unknown   Source)


用了DBCP连接池,TOMCAT服务器,微软驱动   过一段时间后,就抛这个异常,服务器就当机...怎么解决啊?

------解决方案--------------------
先换驱动,用jtds,微软的驱动问题多多。