c3p0死锁问题,DEADLOCK!!! 5C

环境是tomcat7 mysql5.6.33 jdk1.7

首先项目部署到tomcat中可以直接启动,用的是本机的mysql数据库,
但是在eclipse中运行项目就报c2p0死锁。修改了连接数也不管用。而且我重装了mysql也不行。eclipse和tomcat用的都是同一个mysql数据库。eclipse重新安装也还是这样子,求高手指导。

十一月 29, 2017 4:03:25 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.70
十一月 29, 2017 4:03:25 下午 org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
信息: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [105] milliseconds.
十一月 29, 2017 4:03:27 下午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
十一月 29, 2017 4:03:27 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]
十一月 29, 2017 4:03:27 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
十一月 29, 2017 4:03:27 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 1988 ms
16:03:27,866 INFO [JForumBaseServlet ] Starting JForum. Debug mode is true
16:03:27,873 INFO [ConfigLoader ] Using cache engine: net.jforum.cache.DefaultCacheEngine
16:03:27,876 INFO [ConfigLoader ] Creating an instance of net.jforum.repository.BBCodeRepository
16:03:27,878 INFO [ConfigLoader ] Creating an instance of net.jforum.repository.RankingRepository
16:03:27,880 INFO [ConfigLoader ] Creating an instance of net.jforum.repository.SmiliesRepository
16:03:27,881 INFO [ConfigLoader ] Creating an instance of net.jforum.repository.ForumRepository
16:03:27,884 INFO [ConfigLoader ] Creating an instance of net.jforum.repository.TopicRepository
16:03:27,887 INFO [ConfigLoader ] Creating an instance of net.jforum.SessionFacade
16:03:27,888 INFO [ConfigLoader ] Creating an instance of net.jforum.repository.PostRepository
16:03:27,889 INFO [ConfigLoader ] Creating an instance of net.jforum.repository.Tpl
16:03:27,891 INFO [ConfigLoader ] Creating an instance of net.jforum.repository.RolesRepository
16:03:27,891 INFO [ConfigLoader ] Creating an instance of net.jforum.repository.SecurityRepository
16:03:27,893 INFO [ConfigLoader ] Creating an instance of net.jforum.repository.BanlistRepository
16:03:27,951 INFO [FileMonitor ] Watching J:\tool\eclipse_mars\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\JForumBBS/WEB-INF/config/languages/en_US.properties
16:03:27,953 INFO [FileMonitor ] Watching J:\tool\eclipse_mars\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\JForumBBS/WEB-INF/config/languages/zh_CN.properties
16:03:27,969 INFO [ConfigLoader ] Loading JDBC driver net.jforum.dao.mysql.MysqlDataAccessDriver
16:03:28,026 INFO [FileMonitor ] Watching J:\tool\eclipse_mars\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\JForumBBS/WEB-INF/config/database/generic/generic_queries.sql
16:03:28,026 INFO [FileMonitor ] Watching J:\tool\eclipse_mars\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\JForumBBS/WEB-INF/config/database/mysql/mysql.sql
16:03:28,027 INFO [FileMonitor ] Watching J:\tool\eclipse_mars\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\JForumBBS/WEB-INF/config/SystemGlobals.properties
16:03:28,102 INFO [MLog ] MLog clients using log4j logging.
16:03:28,127 INFO [C3P0Registry ] Initializing c3p0-0.9.1-pre9 [built 23-September-2006 01:47:24; debug? true; trace: 10]
16:03:28,184 INFO [AbstractPoolBackedDataSource] Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 120000, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 650b287f, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 650b287f, idleConnectionTestPeriod -> 3600, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://localhost:3306/jforum?user=root&password=root&autoReconnect=true&useNewIO=false&zeroDateTimeBehavior=convertToNull&useServerPrepStmts=false&dumpQueriesOnException=true&jdbcCompliantTruncation=false&useUnicode=true&characterEncoding=utf8, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 1000, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 5, numHelperThreads -> 3, preferredTestQuery -> null, properties -> {}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 180, usesTraditionalReflectiveProxies -> false ]
16:03:48,172 WARN [ThreadPoolAsynchronousRunner] com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@23eb54ea -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
16:03:48,174 WARN [ThreadPoolAsynchronousRunner] com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@23eb54ea -- APPARENT DEADLOCK!!! Complete Status:
Managed Threads: 3
Active Threads: 3
Active Tasks:
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@7dec08b1 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@132edd0d (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@69b28a51 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2)
Pending Tasks:
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@4897020d
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@3207c8b6
Pool thread stack traces:
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2,5,main]
java.lang.Thread.sleep(Native Method)
com.mysql.jdbc.Connection.createNewIO(Connection.java:2828)
com.mysql.jdbc.Connection.(Connection.java:1531)
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:120)
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:143)
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:132)
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:129)
com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:862)
com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:33)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1527)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,5,main]
java.lang.Thread.sleep(Native Method)
com.mysql.jdbc.Connection.createNewIO(Connection.java:2828)
com.mysql.jdbc.Connection.(Connection.java:1531)
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:120)
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:143)
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:132)
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:129)

1个回答

你检查一下数据库是否存在。classforname是否正确还有数据库驱动

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问