liferay c3p0明显陷入僵局!在HSQL上

时间:2012-07-04 04:05:08

标签: java liferay-6 hsqldb jboss5.x

在编译了liferay 6.0.6的源代码并将它们部署到jboss 5.1.0 GA之后,我在启动jboss时出现了以下错误。

2012-07-04 03:47:11,847 INFO  [com.liferay.portal.spring.hibernate.DialectDetector] (main) Using dialect org.hibernate.dialect.HSQLDialect
2012-07-04 03:48:31,054 WARN  [com.mchange.v2.async.ThreadPoolAsynchronousRunner] (Timer-1) com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@1aee7e -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
2012-07-04 03:48:31,093 WARN  [com.mchange.v2.async.ThreadPoolAsynchronousRunner] (Timer-1) com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@1aee7e -- APPARENT DEADLOCK!!! Complete Status: 
    Managed Threads: 3
    Active Threads: 3
    Active Tasks: 
        com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@1b2eecb (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0)
        com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@5b66d0 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2)
        com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@baf34f (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1)
    Pending Tasks: 
        com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@1bbd74c
        com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@133c07e
        com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@a2a139
        com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@106cc7d
        com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@15b47ff
        com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@1d3e63b
        com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@b035a8
Pool thread stack traces:
    Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,5,jboss]
        org.hsqldb.jdbc.jdbcDatabaseMetaData.getTables(Unknown Source)
        com.mchange.v2.c3p0.impl.DefaultConnectionTester.activeCheckConnectionNoQuery(DefaultConnectionTester.java:185)
        com.mchange.v2.c3p0.impl.DefaultConnectionTester.activeCheckConnection(DefaultConnectionTester.java:62)
        com.mchange.v2.c3p0.AbstractConnectionTester.activeCheckConnection(AbstractConnectionTester.java:67)
        com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.testPooledConnection(C3P0PooledConnectionPool.java:368)
        com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.refurbishIdleResource(C3P0PooledConnectionPool.java:310)
        com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask.run(BasicResourcePool.java:1999)
        com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
    Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2,5,jboss]
        org.hsqldb.jdbc.jdbcDatabaseMetaData.getTables(Unknown Source)
        com.mchange.v2.c3p0.impl.DefaultConnectionTester.activeCheckConnectionNoQuery(DefaultConnectionTester.java:185)
        com.mchange.v2.c3p0.impl.DefaultConnectionTester.activeCheckConnection(DefaultConnectionTester.java:62)
        com.mchange.v2.c3p0.AbstractConnectionTester.activeCheckConnection(AbstractConnectionTester.java:67)
        com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.testPooledConnection(C3P0PooledConnectionPool.java:368)
        com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.refurbishIdleResource(C3P0PooledConnectionPool.java:310)
        com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask.run(BasicResourcePool.java:1999)
        com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
    Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1,5,jboss]
        org.hsqldb.jdbc.jdbcDatabaseMetaData.getTables(Unknown Source)
        com.mchange.v2.c3p0.impl.DefaultConnectionTester.activeCheckConnectionNoQuery(DefaultConnectionTester.java:185)
        com.mchange.v2.c3p0.impl.DefaultConnectionTester.activeCheckConnection(DefaultConnectionTester.java:62)
        com.mchange.v2.c3p0.AbstractConnectionTester.activeCheckConnection(AbstractConnectionTester.java:67)
        com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.testPooledConnection(C3P0PooledConnectionPool.java:368)
        com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.refurbishIdleResource(C3P0PooledConnectionPool.java:310)
        com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask.run(BasicResourcePool.java:1999)
        com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)

    2012-07-04 03:49:31,104 WARN  [com.mchange.v2.async.ThreadPoolAsynchronousRunner] (Timer-1) Task com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@1b2eecb (in deadlocked PoolThread) failed to complete in maximum time 60000ms. Trying interrupt().
    2012-07-04 03:49:31,104 WARN  [com.mchange.v2.async.ThreadPoolAsynchronousRunner] (Timer-1) Task com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@5b66d0 (in deadlocked PoolThread) failed to complete in maximum time 60000ms. Trying interrupt().
    2012-07-04 03:49:31,104 WARN  [com.mchange.v2.async.ThreadPoolAsynchronousRunner] (Timer-1) Task com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@baf34f (in deadlocked PoolThread) failed to complete in maximum time 60000ms. Trying interrupt().

我在网上搜索并发现它与c3p0问题有关。见this linkthis。我按照说明操作,尝试在$LIFERAY_HOME/portal-ext.properties

中进行配置更改
hibernate.c3p0.max_statements=0

 jdbc.default.acquireIncrement=5
 jdbc.default.maxPoolSize=100
 jdbc.default.minPoolSize=10
 jdbc.default.numHelperThreads=10

但它不起作用。

有什么建议吗? 谢谢

1 个答案:

答案 0 :(得分:2)

您是否检查过Liferay问题? http://issues.liferay.com/browse/LPS-11779

无论如何,您可以查看this thread

希望它会有所帮助。