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

写这篇日记记录一下自己的愚蠢行为。

具体报错如下:

信息: Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 10, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 2sra1q9p18yoewz1fhnp77|14651f2a, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 2sra1q9p18yoewz1fhnp77|14651f2a, idleConnectionTestPeriod -> 0, initialPoolSize -> 20, jdbcUrl -> jdbc:mysql://127.0.0.1:3306/personnel_management_system, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 50, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 20, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]
八月 02, 2017 4:26:06 下午 com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector run
警告: com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@dc53e52 -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
八月 02, 2017 4:26:06 下午 com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector run
警告: com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@dc53e52 -- APPARENT DEADLOCK!!! Complete Status: 
Managed Threads: 3
Active Threads: 3
Active Tasks: 
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@302c19a (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@73d5522 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@423fcba1 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2)
Pending Tasks: 
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@662c4a1a
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@73b74954
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1e4e9645
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@221034ee
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@26e8d62c
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@6fdcd64c
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@54a994c
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@265e6a4f
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@46e7911e
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@4f004138
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1ed1216d
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@4b882cea
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@319d3be4
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@7c59a56e
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@6b9439c1
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@61f1a725
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@39ebe2e4
Pool thread stack traces:
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,5,main]
java.lang.Thread.sleep(Native Method)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1805)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1,5,main]
java.lang.Thread.sleep(Native Method)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1805)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2,5,main]
java.lang.Thread.sleep(Native Method)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1805)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)


查看了网上的各种解决办法,说是c3p0的bug,,,,可能是某个路径多了个空格,在Hibernate配置文件中添加<property name="hibernate.c3p0.max_statements">0</property>

等等。。。。。。对我都没有用,估计是太累了。

最后我还是找到了我这个问题的原因了。

搞了半天原来是自己的MySQL数据库服务没有启动。也就是说错误原因是:数据库连接不上。

原来抛这个异常的原因也有可能是数据库服务没有启动啊,报错还能不能直白点,被自己蠢哭。

posted @ 2017-08-02 16:38  钓鱼翁  阅读(2498)  评论(0编辑  收藏  举报