搭建jFinal 2.2 按照文档配置Oracle 11gR2项目运行过程中间隔报C3P0 APPARENT DEADLOCK!!! Complete Status 错误

congfig 配置如下:

public void configPlugin(Plugins me) {

  C3p0Plugin cp = new C3p0Plugin(getProperty("jdbcUrl"),getProperty("user"),getProperty("password").trim());

  //配置Oracle驱动

  cp.setDriverClass("oracle.jdbc.driver.OracleDriver");

  me.add(cp);

  ActiveRecordPlugin arp = new ActiveRecordPlugin(cp);

  me.add(arp);

  // 配置Oracle方言

  arp.setDialect(new OracleDialect());

  // 配置属性名(字段名)大小写不敏感容器工厂

  arp.setContainerFactory(new CaseInsensitiveContainerFactory());

  arp.addMapping("person", "p_id", Person.class);

}


间隔一段时间循环报错误如下,但是不影响项目运行使用:

2016-12-06 15:09:50

[WARN]-[Thread: C3P0PooledConnectionPoolManager[identityToken->1b61hpq9k1mj7p9pjki3nn|1fd24c1]-AdminTaskTimer]-[com.mchange.v2.async.ThreadPoolAsynchronousRunner.processReplacedThreads()]: Task com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@c72d68 (in deadlocked PoolThread) failed to complete in maximum time 60000ms. Trying interrupt().


2016-12-06 15:09:50

[WARN]-[Thread: C3P0PooledConnectionPoolManager[identityToken->1b61hpq9k1mj7p9pjki3nn|1fd24c1]-AdminTaskTimer]-[com.mchange.v2.async.ThreadPoolAsynchronousRunner.processReplacedThreads()]: Task com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@5b0046 (in deadlocked PoolThread) failed to complete in maximum time 60000ms. Trying interrupt().


2016-12-06 15:10:00

[WARN]-[Thread: C3P0PooledConnectionPoolManager[identityToken->1b61hpq9k1mj7p9pjki3nn|1fd24c1]-AdminTaskTimer]-[com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector.run()]: com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@1b47433 -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!


2016-12-06 15:10:00

[WARN]-[Thread: C3P0PooledConnectionPoolManager[identityToken->1b61hpq9k1mj7p9pjki3nn|1fd24c1]-AdminTaskTimer]-[com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector.run()]: com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@1b47433 -- APPARENT DEADLOCK!!! Complete Status: 

Managed Threads: 3

Active Threads: 3

Active Tasks: 

com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@1d295de

on thread: C3P0PooledConnectionPoolManager[identityToken->1b61hpq9k1mj7p9pjki3nn|1fd24c1]-HelperThread-#2

com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@6d625b

on thread: C3P0PooledConnectionPoolManager[identityToken->1b61hpq9k1mj7p9pjki3nn|1fd24c1]-HelperThread-#0

com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@1544abc

on thread: C3P0PooledConnectionPoolManager[identityToken->1b61hpq9k1mj7p9pjki3nn|1fd24c1]-HelperThread-#1

Pending Tasks: 

com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@f6ae8f

com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@13e6211

Pool thread stack traces:

Thread[C3P0PooledConnectionPoolManager[identityToken->1b61hpq9k1mj7p9pjki3nn|1fd24c1]-HelperThread-#1,5,main]

java.net.SocketInputStream.socketRead0(Native Method)

java.net.SocketInputStream.read(SocketInputStream.java:152)

java.net.SocketInputStream.read(SocketInputStream.java:122)

oracle.net.ns.Packet.receive(Packet.java:300)

oracle.net.ns.DataPacket.receive(DataPacket.java:106)

oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:315)

oracle.net.ns.NetInputStream.read(NetInputStream.java:260)

oracle.net.ns.NetInputStream.read(NetInputStream.java:185)

oracle.net.ano.AnoComm.b(Unknown Source)

oracle.net.ano.AnoComm.o(Unknown Source)

oracle.net.ano.Ano.a(Unknown Source)

oracle.net.ano.Ano.negotiation(Unknown Source)

oracle.net.ns.NSProtocol.connect(NSProtocol.java:439)

oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1102)

oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:320)

oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)

oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:236)

oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)

oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)

com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:175)

com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)

com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)

com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)

com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)

com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)

com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)

com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)

com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)

Thread[C3P0PooledConnectionPoolManager[identityToken->1b61hpq9k1mj7p9pjki3nn|1fd24c1]-HelperThread-#2,5,main]

java.net.SocketInputStream.socketRead0(Native Method)

java.net.SocketInputStream.read(SocketInputStream.java:152)

java.net.SocketInputStream.read(SocketInputStream.java:122)

oracle.net.ns.Packet.receive(Packet.java:300)

oracle.net.ns.DataPacket.receive(DataPacket.java:106)

oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:315)

oracle.net.ns.NetInputStream.read(NetInputStream.java:260)

oracle.net.ns.NetInputStream.read(NetInputStream.java:185)

oracle.net.ns.NetInputStream.read(NetInputStream.java:102)

oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:124)

oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:80)

oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1137)

oracle.jdbc.driver.T4C8TTIdty.receive(T4C8TTIdty.java:669)

oracle.jdbc.driver.T4C8TTIdty.doRPC(T4C8TTIdty.java:576)

oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1166)

oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:320)

oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)

oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:236)

oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)

oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)

com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:175)

com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)

com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)

com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)

com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)

com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)

com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)

com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)

com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)

Thread[C3P0PooledConnectionPoolManager[identityToken->1b61hpq9k1mj7p9pjki3nn|1fd24c1]-HelperThread-#0,5,main]

java.net.SocketInputStream.socketRead0(Native Method)

java.net.SocketInputStream.read(SocketInputStream.java:152)

java.net.SocketInputStream.read(SocketInputStream.java:122)

oracle.net.ns.Packet.receive(Packet.java:300)

oracle.net.ns.DataPacket.receive(DataPacket.java:106)

oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:315)

oracle.net.ns.NetInputStream.read(NetInputStream.java:260)

oracle.net.ns.NetInputStream.read(NetInputStream.java:185)

oracle.net.ano.AnoComm.b(Unknown Source)

oracle.net.ano.AnoComm.o(Unknown Source)

oracle.net.ano.Ano.a(Unknown Source)

oracle.net.ano.Ano.negotiation(Unknown Source)

oracle.net.ns.NSProtocol.connect(NSProtocol.java:439)

oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1102)

oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:320)

oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)

oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:236)

oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)

oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)

com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:175)

com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)

com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)

com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)

com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)

com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)

com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)

com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)

com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)



2016-12-06 15:11:00

[WARN]-[Thread: C3P0PooledConnectionPoolManager[identityToken->1b61hpq9k1mj7p9pjki3nn|1fd24c1]-AdminTaskTimer]-[com.mchange.v2.async.ThreadPoolAsynchronousRunner.processReplacedThreads()]: Task com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@1544abc (in deadlocked PoolThread) failed to complete in maximum time 60000ms. Trying interrupt().


2016-12-06 15:11:00

[WARN]-[Thread: C3P0PooledConnectionPoolManager[identityToken->1b61hpq9k1mj7p9pjki3nn|1fd24c1]-AdminTaskTimer]-[com.mchange.v2.async.ThreadPoolAsynchronousRunner.processReplacedThreads()]: Task com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@6d625b (in deadlocked PoolThread) failed to complete in maximum time 60000ms. Trying interrupt().


评论区

JFinal

2016-12-06 16:18

换成 DruidPlugin 即可打完收枪

新手学习学习

2016-12-06 16:32

啊,搞了半天,大神一句话,解决,强强强, 刚好19字,1字1元。完美捐助

新手学习学习

2016-12-06 16:35

@JFinal 已捐,请笑纳!希望越做越好,永远支持JFinal!

JFinal

2016-12-06 16:36

@新手学习学习 所谓真传一句话,假传万卷书,感谢你的支持

新手学习学习

2016-12-08 09:33

@JFinal 那天换了DruidPlugin,今天发现启动还有有error 错误,但最后还是可以连接oracle数据库: [ERROR]-[Thread: localhost-startStop-1]-[com.alibaba.druid.pool.DruidDataSource.oracleValidationQueryCheck()]: invalid oracle validationQuery. select 1, may should be : select 1 FROM DUAL

热门反馈

扫码入社