采用c3p0连接池,每次调试程序,第一次访问时(Tomcat服务器重启后再访问)都会出现以下错误,然后连接库需要很长时间,最终是可以连上的,之后再访问就没问题了,请高手们会诊一下,希望能帮小弟解决此问题,不胜感激!

2009-9-27 13:32:26 com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector run
警告: com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@1c5d81c -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
2009-9-27 13:32:26 com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector run
警告: com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@1c5d81c -- APPARENT DEADLOCK!!! Complete Status: 
Managed Threads: 3
Active Threads: 3
Active Tasks: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@b7ad3 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1acdcb9 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1cf2ef6 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2)
Pending Tasks: 
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@114382d
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@744a4d
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@ba2b6b
Pool thread stack traces:
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,5,main]
com.mysql.jdbc.MysqlIO.scanForAndThrowDataTruncation(MysqlIO.java:3685)
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2227)
com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2536)
com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2465)
com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1383)
com.mysql.jdbc.ConnectionImpl.loadServerVariables(ConnectionImpl.java:3777)
com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3348)
com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2045)
com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:718)
com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1,5,main]
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:169)
com.mysql.jdbc.SQLError.<clinit>(SQLError.java:154)
com.mysql.jdbc.MysqlIO.scanForAndThrowDataTruncation(MysqlIO.java:3685)
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2227)
com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2536)
com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2465)
com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1383)
com.mysql.jdbc.ConnectionImpl.loadServerVariables(ConnectionImpl.java:3777)
com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3348)
com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2045)
com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:718)
com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2,5,main]
com.mysql.jdbc.MysqlIO.scanForAndThrowDataTruncation(MysqlIO.java:3685)
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2227)
com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2536)
com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2465)
com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1383)
com.mysql.jdbc.ConnectionImpl.loadServerVariables(ConnectionImpl.java:3777)
com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3348)
com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2045)
com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:718)
com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)

http://www.javaeye.com/topic/22160?page=3#142629
我也遇到这个问题
看下这个应该是c3p0的bug

<property name="hibernate.c3p0.max_statements">0</property>

C3P0连接池问题,APPARENT DEADLOCK!!! Creating emergency..... [问题点数:20分,结帖人lovekong]的更多相关文章

  1. c3p0 APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks

    2018-01-04 15:02:03,319 ---com.mchange.v2.async.ThreadPoolAsynchronousRunner: com.mchange.v2.async.T ...

  2. 解决 APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tas

    报错信息:APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks! 在网上查了一下,大部分网友分析是c ...

  3. eclipse run on server 时 报的错误APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!

    写这篇日记记录一下自己的愚蠢行为. 具体报错如下: 信息: Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ ...

  4. c3p0连接池:com.mysql.cj.exceptions.InvalidConnectionAttributeException

    1 遇到的错误com.mysql.cj.exceptions.InvalidConnectionAttributeException: 四月 17, 2019 10:21:13 上午 com.mcha ...

  5. Maven 工程下 Spring MVC 站点配置 (三) C3P0连接池与@Autowired的应用

    Maven 工程下 Spring MVC 站点配置 (一) Maven 工程下 Spring MVC 站点配置 (二) Mybatis数据操作 前两篇文章主要是对站点和数据库操作配置进行了演示,如果单 ...

  6. c3p0连接池]

    <c3p0-config> <!-- 默认配置 --> <default-config> <property name="jdbcUrl" ...

  7. c3p0连接池获得的Connection执行close方法后是否真的销毁Connection对象?

    问题描述: jfinal做的api系统中,在正常调用接口一段时间后,突然再调用接口的时候,该请求无响应api系统后台也无错误信息 (就是刚开始接口调用是正常的,突然就无响应了) 于是啊,就开始找错误. ...

  8. C3P0连接池在hibernate和spring中的配置

    首先为什么要使用连接池及为什么要选择C3P0连接池,这里就不多说了,目前C3P0连接池还是比较方便.比较稳定的连接池,能与spring.hibernate等开源框架进行整合. 一.hibernate中 ...

  9. HQL查询及Hibernate对c3p0连接池的支持

    //HQL查询 // auto-import要设置true,如果是false,写HQL时要指定类的全名 //查询全部列 Query query = session.createQuery(" ...

随机推荐

  1. javascript中的eval()函数应用以及要点

    eval是干嘛用的?eval是直接将一段字符串作为参数,交给JS引擎预编译器进行动态分析并执行代码.如下: //调试台输出,你可以理解为console.log,再不理解就理解成alert也没事 var ...

  2. java 基本数据类型 回顾

  3. CMake with Win&amp;MinGW

    今天一个下午都在做一件简直耻辱play的事情,论文没看,程序没写,玩了一个下午的编译器...心塞(逃... 言归正传,今天要讲在windows下,使用Cmake和MInGW. 1.g++ MinGW的 ...

  4. poj1159 dp(滚动数组优化)

    H - 简单dp 例题扩展 Crawling in process... Crawling failed Time Limit:3000MS     Memory Limit:65536KB     ...

  5. codeforces contest1082

    C 维护前缀和 题意 每一个id给一个权值序列,从每个id选出数量相同的权值,对他们进行求和,使得他们的和最大 题解 注意负数对结果没有贡献,直接跳过. 当时写的比较挫,连排序都写错了!cf的编译器比 ...

  6. mysql 开发进阶篇系列 6 锁问题(事务与隔离级别介绍)

    一.概述 在数据库中,数据是属于共享资源,为了保证并发访问的一致性,有效性,产生了锁.接下来重点讨论mysql锁机制的特点,常见的锁问题,以及解决mysql锁问题的一些方法或建议. 相比其他数据库,m ...

  7. 怎样让引用类库的类在HelpPage上显示Description

        最近在做 web api 开发的时候遇到这样的问题,即 HelpPage 里只能显示 api 控制器上的注释,对于那些引用了外部类库的类(比如POST提交需要用到的类),就无法显示它们的备注, ...

  8. idea spring-boot gradle mybatis 搭建开发环境

    使用工具idea 2017.2开发,gradle构建项目,使用的技术有spring-boot.mybatis 1.新建项目 说明:1.src为源码路径,开发主要在src下 2.src/main/jav ...

  9. 数据库级别DDL操作监控审计、数据库触发器/服务器触发器

    关键词:数据库触发器/服务器触发器  ,数据库级别DDL操作监控审计,禁止修改登录名密码 [1]数据库级别DDL操作监控审计 转自2012示例库,只能数据库级别,不能实例级别 use database ...

  10. 教你轻松自己定义ViewPagerIndicator

    ViewPagerIndicator集成分页指示器.事实上就是标题栏和ViewPager的联动效果,大家先看一下效果图直观了解:(图侵删) 这篇文章将会教大家怎么简单高速地制作自己的ViewPager ...