NutzCN Logo
问答 使用了c3p0连接池总是报错
发布于 3123天前 作者 qq_6c186ef5 2448 次浏览 复制 上一个帖子 下一个帖子
标签:

java.lang.Exception: DEBUG -- CLOSE BY CLIENT STACK TRACE
at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:491)
at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:191)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:470)
at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:964)
at com.mchange.v2.resourcepool.BasicResourcePool.destroyResource(BasicResourcePool.java:989)
at com.mchange.v2.resourcepool.BasicResourcePool.access$100(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$5.run(BasicResourcePool.java:1174)
2016-04-28 16:02:20,602 com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:476) DEBUG - Successfully destroyed PooledConnection: com.mchange.v2.c3p0.impl.NewPooledConnection@1398d43
2016-04-28 16:02:20,602 com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:967) DEBUG - Successfully destroyed resource: com.mchange.v2.c3p0.impl.NewPooledConnection@1398d43
2016-04-28 16:02:20,602 com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:962) DEBUG - Preparing to destroy resource: com.mchange.v2.c3p0.impl.NewPooledConnection@139defe
2016-04-28 16:02:20,602 com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:468) DEBUG - Preparing to destroy PooledConnection: com.mchange.v2.c3p0.impl.NewPooledConnection@139defe
2016-04-28 16:02:20,602 com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:491) DEBUG - com.mchange.v2.c3p0.impl.NewPooledConnection@139defe closed by a client.
java.lang.Exception: DEBUG -- CLOSE BY CLIENT STACK TRACE
at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:491)
at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:191)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:470)
at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:964)
at com.mchange.v2.resourcepool.BasicResourcePool.destroyResource(BasicResourcePool.java:989)
at com.mchange.v2.resourcepool.BasicResourcePool.access$100(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$5.run(BasicResourcePool.java:1174)
2016-04-28 16:02:20,603 com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:476) DEBUG - Successfully destroyed PooledConnection: com.mchange.v2.c3p0.impl.NewPooledConnection@139defe
2016-04-28 16:02:20,603 com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:967) DEBUG - Successfully destroyed resource: com.mchange.v2.c3p0.impl.NewPooledConnection@139defe

6 回复

何时发生?总结规律

在页面连续点击盗用action的时候页面来回切换几次之后就会报出那些信息,然后就死循环状态,console一直打印log

@qq_6c186ef5 是不是反复new NutIoc了?

你看下是不是我的这段代码有问题,但是我判断dao=null的时候才会执行下面代码的
if(dao==null){
Ioc ioc = new NutIoc(new JsonLoader("ioc/"));
DataSource ds = ioc.get(DataSource.class);
dao = new NutDao(ds); //如果已经定义了dao,那么改成dao = ioc.get(Dao.class);

System.out.println("nutz dao已完成实例化");

}

@qq_6c186ef5 必须死

没用nutz mvc?为啥不依赖注入?

添加回复
请先登陆
回到顶部