-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: C3p0 Error Messages
PostPosted: Fri Feb 24, 2006 12:48 pm 
Newbie

Joined: Mon Jul 26, 2004 11:35 am
Posts: 13
Hello,
I am experiencing the following exception with C3p0:

24 Feb 2006 17:22:00,611 WARN BasicResourcePool.run:638 - Failed to destroy resource: com.mchange.v2.c3p0.impl.NewPooledConnection@191a42
java.lang.NullPointerException
at com.mysql.jdbc.Statement.close(Statement.java:808)
at com.mysql.jdbc.Connection.closeAllOpenStatements(Connection.java:2541)
at com.mysql.jdbc.Connection.close(Connection.java:1067)
at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:405)
at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:135)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1.destroyResource(C3P0PooledConnectionPool.java:208)
at com.mchange.v2.resourcepool.BasicResourcePool$5.run(BasicResourcePool.java:634)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:368)

C3P0 Configuration:

<property name="connection.provider_class">net.sf.hibernate.connection.C3P0ConnectionProvider</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://localhost/db</property>
<property name="connection.username">someuser</property>
<property name="connection.password">*****</property>
<property name="connection.autoReconnect">true</property>
<property name="connection.autoReconnectForPools">true</property>
<property name="connection.is-connection-validation-required">true</property>

<!-- c3p0 configuration -->
<property name="c3p0.acquire_increment">1</property>
<property name="c3p0.idle_test_period">100</property> <!-- seconds -->
<property name="c3p0.max_size">100</property>
<property name="c3p0.max_statements">0</property>
<property name="c3p0.min_size">10</property>
<property name="c3p0.timeout">100</property> <!-- seconds -->
<property name="c3p0.validate">true</property>

Hibernate version is 2.1.8, and c3p0 version is 0.9.0
Running on tomcat 5.0.3 with jdk1.4.2.
C3p0 version .8.4.5 is working fine.
Any suggestions greatly appreciated
Thank you,
Roman


Top
 Profile  
 
 Post subject: C3P0 deadlock
PostPosted: Wed Mar 01, 2006 10:57 am 
Newbie

Joined: Mon Jul 26, 2004 11:35 am
Posts: 13
Now there is a deadlock occuring every few days...
Hibernate v 2.1.8 with MySQL 4.0.26 running on tomcat 5.0.28, c3p0 .9.04

Hibernate.cfg.xml:
<!-- Maximum size of C3P0 connection pool -->
<!-- Maximum size of C3P0 statement cache -->
<!-- Number of connections acquired when C3P0 pool is exhausted -->
<!-- Idle time (seconds) before a C3P0 pooled connection is validated -->
<!-- Maximum idle time (seconds) for a C3P0 connection pool -->
<property name="c3p0.min_size">5</property>
<property name="c3p0.max_size">25</property>
<property name="c3p0.timeout">1800</property>
<property name="c3p0.max_statements">0</property>
<property name="c3p0.acquire_increment">3</property>
<property name="c3p0.validate">true</property>
<property name="c3p0.idle_test_period">180</property>

c3p0.properties:
c3p0.acquireRetryDelay=1000
c3p0.acquireRetryAttempts=60
c3p0.breakAfterAcquireFailure=false
c3p0.preferredTestQuery=SELECT 1
c3p0.testConnectionOnCheckin=true
c3p0.testConnectionOnCheckout=true


01 Mar 2006 15:49:49,165 WARN ThreadPoolAsynchronousRunner.run:435 - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@1cfe3 -- APPARENT DEADLOCK!!! Complete Status: [num_managed_threads: 3, num_active: 3; activeTasks: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@8627c3 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0), com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@19c9d88 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1), com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@12a7fd6 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2); pendingTasks: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@12ec15a, com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@982d8e]
01 Mar 2006 15:50:49,996 WARN ThreadPoolAsynchronousRunner.processReplacedThreads:281 - Task com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@8627c3 (in deadlocked PoolThread) failed to complete in maximum time 60000ms. Trying interrupt().


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.