早教吧作业答案频道 -->其他-->
JDBC连接池的问题.请问在什么情况下,找了好久,找不到原因.org.apache.tomcat.jdbc.pool.ConnectionPoolabandon警告:ConnectionhasbeenabandonedPooledConnection[com.mysql.jdbc.JDBC4Connection@5ebeda8]:java.lang.Exceptionatorg.apa
题目详情
JDBC连接池的问题.请问在什么情况下,找了好久,找不到原因.
org.apache.tomcat.jdbc.pool.ConnectionPool abandon
警告:Connection has been abandoned PooledConnection[com.mysql.jdbc.JDBC4Connection@5ebeda8]:java.lang.Exception
at org.apache.tomcat.jdbc.pool.ConnectionPool.getThreadDump(ConnectionPool.java:1023)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:752)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:600)
at org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:179)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:126)
at com.smartererp.common.db.BaseDao.getConn(BaseDao.java:71)
at com.smartererp.cos.biz.order.OrderDAO.generateMakeorderSyncInfo(OrderDAO.java:823)
at com.smartererp.cos.biz.order.OrderManager.makeOrder(OrderManager.java:54)
at com.smartererp.cos.ui.order.OrderFacade.makeOrder(OrderFacade.java:40)
at pc.PC001Action._btnMusterPass(PC001Action.java:78)
at pc.PC001Action.execute(PC001Action.java:25)
at com.needtool.jdf.TemplateAction.doprocess(TemplateAction.java:64)
at com.needtool.jdf.DispatchServlet.processRequest(DispatchServlet.java:190)
at com.needtool.jdf.DispatchServlet.doPost(DispatchServlet.java:306)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.needtool.jdf.CommonFilter.doFilter(CommonFilter.java:21)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
org.apache.tomcat.jdbc.pool.ConnectionPool abandon
警告:Connection has been abandoned PooledConnection[com.mysql.jdbc.JDBC4Connection@5ebeda8]:java.lang.Exception
at org.apache.tomcat.jdbc.pool.ConnectionPool.getThreadDump(ConnectionPool.java:1023)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:752)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:600)
at org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:179)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:126)
at com.smartererp.common.db.BaseDao.getConn(BaseDao.java:71)
at com.smartererp.cos.biz.order.OrderDAO.generateMakeorderSyncInfo(OrderDAO.java:823)
at com.smartererp.cos.biz.order.OrderManager.makeOrder(OrderManager.java:54)
at com.smartererp.cos.ui.order.OrderFacade.makeOrder(OrderFacade.java:40)
at pc.PC001Action._btnMusterPass(PC001Action.java:78)
at pc.PC001Action.execute(PC001Action.java:25)
at com.needtool.jdf.TemplateAction.doprocess(TemplateAction.java:64)
at com.needtool.jdf.DispatchServlet.processRequest(DispatchServlet.java:190)
at com.needtool.jdf.DispatchServlet.doPost(DispatchServlet.java:306)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.needtool.jdf.CommonFilter.doFilter(CommonFilter.java:21)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
▼优质解答
答案和解析
推荐在使用连接池的情况下connection对象每次用完后都关闭.
这种情况我看应该修改一下jdbc连接池的配置.添加如下配置:
removeAbandoned:true
removeAbandonedTimeout:120
testOnBorrow:true
logAbandoned:true
这种情况我看应该修改一下jdbc连接池的配置.添加如下配置:
removeAbandoned:true
removeAbandonedTimeout:120
testOnBorrow:true
logAbandoned:true
看了 JDBC连接池的问题.请问在...的网友还看了以下:
选出每组单词中划括号部分读音不同的一项.1.A:t(o)day.B:t(o)morrow.C:st 2020-04-26 …
求lim[x^(n+1)-(n+1)x+n]/(x-1)^2x-->1=lim(t->0)[[1+ 2020-06-04 …
下列词语中,加点字的读音全都正确的一组是()A.瘪三(biě)脊梁(jǐ)炮烙(páo)杀一儆百( 2020-06-21 …
下列各题中加下划线字的注音全都正确的一项是A.鞭挞tà叨光tāo体已tī孝悌tìB.殷红yīn奶酪 2020-07-02 …
下列各题中黑体加点字的注音全都正确的一项是A.鞭挞tà叨光tāo体已tī孝悌tìB.殷红yīn奶酪 2020-07-02 …
写单词,这些单词打乱顺序了!:1.d,f,e,n,i,f,e,r,t,()2.g,h,o,e,t, 2020-07-26 …
谁会用下列字母组成三个英语单词???g,a,l,o,ts,t,o,a,o,ha,s,f,t,ks,h 2020-11-01 …
关于渐进时间复杂度题已知某一算法的时间复杂度上限函数满足递归关系T(n)=2(T/2)+n,那么该算 2021-01-14 …
d、o、w、l、u可以组成什么单词?语境:Marycanpalychessbutshe()swim. 2021-02-05 …
英文单词分类填空动物类1.O()t()p()s2.k()t()e()3.l()b()t()r4.a( 2021-02-05 …