访问网页超时异常

 

在TomCat开启一定时间时,再进行注册会抛此异常

解决办法:重新开启TomCat。

但这个方法只能解决一时的问题,TomCat再次开启一定时间然后注册时仍然会抛此异常

 

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object

    at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:104)

    at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)

    at cn.twitter.util.JdbcUtil.getConn(JdbcUtil.java:39)

    at cn.twitter.dao.EmailDaoImpl.registerCheck(EmailDaoImpl.java:111)

    at cn.twitter.web.servlet.EmailServlet.doPost(EmailServlet.java:56)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291)

    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)

    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)

    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

    at java.lang.Thread.run(Thread.java:619)

Caused by: java.util.NoSuchElementException: Timeout waiting for idle object

    at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:825)

    at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)

    ... 18 more

2011-11-30 10:15:38 org.apache.catalina.core.StandardWrapperValve invoke

严重: Servlet.service() for servlet EmailServlet threw exception

java.lang.NullPointerException

    at cn.twitter.dao.EmailDaoImpl.registerCheck(EmailDaoImpl.java:120)

    at cn.twitter.web.servlet.EmailServlet.doPost(EmailServlet.java:56)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291)

    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)

    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)

    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

    at java.lang.Thread.run(Thread.java:619)

 

你可能感兴趣的:(访问网页超时异常)