欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

connection-Connection has been abandoned :java.lang.Exception

程序员文章站 2022-05-12 09:45:20
...
connectionmysqljavadbcpexception

使用的DBCP连接池和Mysql数据库,偶尔会出现这种异常,不知是什么导致的,并且在出现这个异常的地方进行对Exception的catch,但是奇怪的时捕获不了这种异常,异常一直被传回虚拟机然后打印,请哪位大侠指导一下,具体的异常如下

警告: Connection has been abandoned PooledConnection[com.mysql.jdbc.Connection@5
17667bd]:java.lang.Exception
at org.apache.tomcat.jdbc.pool.ConnectionPool.getThreadDump(ConnectionPo
ol.java:1062)
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(Connectio
nPool.java:704)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(Connectio
nPool.java:631)
at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:4
85)
at org.apache.tomcat.jdbc.pool.ConnectionPool.(ConnectionPool.java
:143)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourcePro
xy.java:116)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProx
y.java:103)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceP
roxy.java:127)
at analyseutil.dbmanager.C3P0ConnectionPool.getConnection(C3P0Connection
Pool.java:38)
at analyseutil.dbmanager.DBManager.findCompanyByName(DBManager.java:41)
at datastore.InsertOrUpdate.handleNextData(InsertOrUpdate.java:108)
at datastore.InsertOrUpdate$1.run(InsertOrUpdate.java:48)
at java.lang.Thread.run(Thread.java:662)