Dbcp2抛出org.apache.commons.dbcp2.LifetimeExceededException
Posted 一沙世界
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Dbcp2抛出org.apache.commons.dbcp2.LifetimeExceededException相关的知识,希望对你有一定的参考价值。
1 三月 24, 2016 5:16:33 下午 org.apache.commons.dbcp2.BasicDataSource onSwallowException 2 警告: An internal object pool swallowed an Exception. 3 org.apache.commons.dbcp2.LifetimeExceededException: The lifetime of the connection [14] milliseconds exceeds the maximum permitted value of [10] milliseconds 4 at org.apache.commons.dbcp2.PoolableConnectionFactory.validateLifetime(PoolableConnectionFactory.java:424) 5 at org.apache.commons.dbcp2.PoolableConnectionFactory.passivateObject(PoolableConnectionFactory.java:364) 6 at org.apache.commons.pool2.impl.GenericObjectPool.returnObject(GenericObjectPool.java:581) 7 at org.apache.commons.dbcp2.PoolableConnection.close(PoolableConnection.java:206) 8 at org.apache.commons.dbcp2.DelegatingConnection.closeInternal(DelegatingConnection.java:235) 9 at org.apache.commons.dbcp2.DelegatingConnection.close(DelegatingConnection.java:218) 10 at org.apache.commons.dbcp2.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:244) 11 at org.apache.commons.dbutils.DbUtils.close(DbUtils.java:60) 12 at org.apache.commons.dbutils.AbstractQueryRunner.close(AbstractQueryRunner.java:438) 13 at org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:359) 14 at org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:307) 15 at com.starunion.java.fsccserver.dao.DbUtilsTemplate.getCount(DbUtilsTemplate.java:188) 16 at com.starunion.java.fsccserver.dao.fs.DaoCdrInfo.getSessionCount(DaoCdrInfo.java:33) 17 at com.starunion.java.fsccserver.service.client.ProcClientReqSql.getCdrSessionCount(ProcClientReqSql.java:45) 18 at com.starunion.java.fsccserver.service.client.ClientReqMsgLogicService.procClientRequest(ClientReqMsgLogicService.java:114) 19 at com.starunion.java.fsccserver.thread.client.SocketClientTcpThread.run(SocketClientTcpThread.java:99)
结合我的实际环境,推测这个抛出的原因:
是数据库建立链接的时候身份验证的时候超时。
但是不影响返回后面的查询结果,所以……这个问题先放一放吧。
或者谁能帮我解答一下?
以上是关于Dbcp2抛出org.apache.commons.dbcp2.LifetimeExceededException的主要内容,如果未能解决你的问题,请参考以下文章
Flink SQL ClassNotFoundException: org.apache.commons.compress.compressors.zstandard.ZstdCompressorIn
spark 插入数据到mysql时遇到的问题 org.apache.spark.SparkException: Task not serializable
SpringBoot JNDI 数据源抛出 java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.dbcp2.BasicDataSource