c3p0 « Transaction « JPA Q&A





1. What are the required C3P0 settings for hibernate in order to avoid Deadlocks    stackoverflow.com

I use Hibernate together with MySQL 5.1.30. I have the next libraries:

  • c3p0-0.0.1.2.jar
  • mysql-connector-java-5.0.3-bin.jar
  • hibernate3.jar
I use a hibernate.cfg.xml for configuration:
<!DOCTYPE hibernate-configuration PUBLIC
    "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
  ...

2. SQL Server 2005 - Cannot rollback nested transaction    stackoverflow.com

Sometimes I get the following from SQL Server 2005 when executing a stored procedure:

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Cannot roll back T1. No transaction or savepoint of that name was found.
   ...

3. Hibernate followers and pains : Illegal attempt to associate a collection with two open sessions    stackoverflow.com

i am working on a game project, where i need to rank players every 10 minutes, it is a simple! stock games. in order to update player ranks, i run a thread ...

4. APPARENT DEADLOCK Hibernate and c3p0 error site goes down please help    coderanch.com

Hi guys, I am very new to java and i have just started my job few months back. I am working on a website which is based on Java,JSP,Struts,MySQL,Hibernate3.0 and i am using c3p0 for connection pooling. But i get into a APPARENT DEADLOCK very frequently and because of which the site goes down. I need some help in this Here ...

5. c3p0 APPARENT DEADLOCK    forum.hibernate.org

Newbie Joined: Thu Nov 26, 2009 10:49 pm Posts: 1 Heroes: help! Versions: Hibernate 3.2.4.sp1 c3p0 0.9.1.2 Oracle9i 9.2.0.1.0 ojdbc14.jar 10.2.0.3.0 Code: c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 5, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, ...

6. Hibernate+C3P0 with 2 DataSources failing in deadlock    forum.hibernate.org

Hi, I have a requirement for using two data sources. They share the same jdbc URL but use different credentials for authentication. Both of them have their own session factories and transaction managers defined and all DAO's are injected with the correct session factory in the XML config (not using autowired). Application startup fails with: WARN | ThreadPoolAsynchronousRunner.run:608 - com.mchange.v2.async.ThreadPoolAsynchronousRunner$ DeadlockDetector@1b317f5 ...

7. c3p0 apparent deadlock / creating emergency threads    forum.hibernate.org

Newbie Joined: Mon Jul 05, 2010 1:17 pm Posts: 4 Hey hey, nobody has an Idea? heres our hibernate.properties and our my.cfn Code: jdbc.driverClassName=com.mysql.jdbc.Driver jdbc.url=jdbc:mysql://***/***?useUnicode=true&characterEncoding=UTF-8 jdbc.username=*** jdbc.password=*** hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect hibernate.show_sql=false hibernate.connection.charSet=utf8 hibernate.update.mode=update hibernate.c3p0.minPoolSize=5 hibernate.c3p0.maxPoolSize=400 hibernate.c3p0.timeout=1000 hibernate.c3p0.max_statement=300 hibernate.cache.provider_class=org.hibernate.cache.EhCacheProvider hibernate.cache.region_prefix=hibernate hibernate.cache.use_second_level_cache=true hibernate.cache.use_query_cache=true Code: # # The MySQL database server configuration file. # # You can copy this to one of: # - "/etc/mysql/my.cnf" to ...

8. c3p0 apparent deadlock / creating emergency threads    forum.hibernate.org

Newbie Joined: Sat Jul 16, 2011 4:15 pm Posts: 1 Versions: Hibernate 3 c3p0-0.9.1 I was using it @ my own computer with eclipse and it works perfectly. When I tryed to send all my applications to linux red/hat, the problems begin. I'm getting messages such as the following: When I stop tomcat: Code: INFO: Stopping service Catalina Jul 16, 2011 ...

9. Rollback with C3P0 issued twice...    forum.hibernate.org

... public static void rollbackTransaction() { Transaction tx = (Transaction) threadTransaction.get(); try { threadTransaction.set(null); if (tx != null && !tx.wasCommitted() && !tx.wasRolledBack()) { tx.rollback(); ...





10. [c3p0] apparent deadlock    forum.hibernate.org

Beginner Joined: Wed May 05, 2004 3:26 am Posts: 25 At some point our database server failed and that is when all exceptions started to roll out. I was wondering why it wasnt possible to acquire a new connection through the connection pool once the server recovered. All queries are simple selects (no inserts, or updates). Using a ThreadLocal pattern there ...

11. c3p0 apparent deadlock / creating emergency threads    forum.hibernate.org

2005-09-06@06:29:12.383 WARN [Timer-0] - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@130b13c -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks! 2005-09-06@06:29:12.383 WARN [Timer-0] - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@130b13c -- APPARENT DEADLOCK!!! Complete Status: [num_managed_threads: 3, num_active: 3; activeTasks: com.mchange.v2.resourcepool.BasicResourcePool$5@98a2e8 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1), com.mchange.v2.resourcepool.BasicResourcePool$5@ef4331 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0), com.mchange.v2.resourcepool.BasicResourcePool$5@244b92 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2); pendingTasks: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@dd9094, com.mchange.v2.c3p0.stmt.GooGooStatementCache$2@3f03c3, com.mchange.v2.c3p0.stmt.GooGooStatementCache$2@11033db, com.mchange.v2.c3p0.stmt.GooGooStatementCache$2@bc80d8, com.mchange.v2.c3p0.stmt.GooGooStatementCache$2@1af24e2, com.mchange.v2.c3p0.stmt.GooGooStatementCache$2@19e900a, com.mchange.v2.c3p0.stmt.GooGooStatementCache$2@102b5ab, com.mchange.v2.c3p0.stmt.GooGooStatementCache$2@e51c3b, com.mchange.v2.c3p0.stmt.GooGooStatementCache$2@1a06d20, com.mchange.v2.c3p0.stmt.GooGooStatementCache$2@15c82f9, com.mchange.v2.c3p0.stmt.GooGooStatementCache$2@9ac6da, com.mchange.v2.c3p0.stmt.GooGooStatementCache$2@17547dd, com.mchange.v2.c3p0.stmt.GooGooStatementCache$2@c10304, com.mchange.v2.c3p0.stmt.GooGooStatementCache$2@1ad3677, com.mchange.v2.c3p0.stmt.GooGooStatementCache$2@d2eead, com.mchange.v2.c3p0.stmt.GooGooStatementCache$2@33ab8f, com.mchange.v2.c3p0.stmt.GooGooStatementCache$2@4473dc, com.mchange.v2.c3p0.stmt.GooGooStatementCache$2@12800a, com.mchange.v2.c3p0.stmt.GooGooStatementCache$2@9420f9]

12. APPARENT DEADLOCK!!! (MySQL, c3p0-0.9.0    forum.hibernate.org

Newbie Joined: Thu Sep 22, 2005 1:31 pm Posts: 3 Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 3.0.3 Mapping documents: Code between sessionFactory.openSession() and session.close(): A bunch of regular java.sql.Statement.executeQuery() statements Full stack trace of any exception that occurs: 22:46:03,781 WARN JDBCContext: afterTransactionCompletion() was never called com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@133eac6 -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending ...

13. c3p0 deadlock exception    forum.hibernate.org

14. Hibernate + c3p0 + committing transactions    forum.hibernate.org

I'm facing a mystifying problem that I assume is my fault and simple to solve, I just can't seem to find it. For various reasons we're switching from the Hibernate mbean (com.code42.hibernate.jmx.HibernateService) to a configuration based upon hibernate.cfg.xml that uses c3p0. All of the configuration parameters have been moved over to the new file, the mbean config has been removed, c3p0 ...

15. c3p0 deadlock during initialization    forum.hibernate.org

Hibernate version: 3.0.5 c3p0 version:: 0.9.1 Postgres version: 8.1.4 Below is the end of my Tomcat's log file (catalina.out). As you can see my app is apparently deadlocking during c3p0 initialization. This is on Linux. I have to kill Tomcat with "kill -9" to get out of this. I am using the identical configuration on Windows and it is working fine: ...

16. c3p0 and HOLD_CURSORS_OVER_COMMIT    forum.hibernate.org

I have a problem using c3p0. In the following code snippet (simplified from what I am really doing) I create a statement that will not be closed when a transaction is committed (the parameter ResultSet.HOLD_CURSORS_OVER_COMMIT). In the code, I iterate over the result set and periodically commit the transaction and start a new one. I do this because of a memory ...





17. C3po deadlock    forum.hibernate.org

Hello. I am getting a deadlock on one of my applications. I am using Tomcat 5.5 with c3po for pooling. I have found a couple of threads on this forum and have followed the advice of upgrading my c3po to version pre11 and setting my pooling config to c3p0.max_statements 0, but I still get the same deadlock errors (see stack trace ...

18. C3PO Occasional Apparent Deadlock    forum.hibernate.org

Hello Using Hibernate 3.2.1 / c3p0 0.9.1-pre9 we're getting occasional APPARENT DEADLOCK messages : What does that exactly mean ? 2007-06-27 17:37:18,861 [Timer-1] WARN com.mchange.v2.async.ThreadPoolAsynchronousRunner - com.mchange.v2.async.ThreadPoolAsynchronousRunner$Deadl ockDetector@323993b6 -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks! 2007-06-27 17:37:18,876 [Timer-1] WARN com.mchange.v2.async.ThreadPoolAsynchronousRunner - com.mchange.v2.async.ThreadPoolAsynchronousRunner$Deadl ockDetector@323993b6 -- APPARENT DEADLOCK!!! Complete Status: Managed Threads: 3 Active Threads: 3 Active Tasks: com.mchange.v2.c3p0.stmt.GooGooStatementCache$1StatementCloseTask@4227a2f6 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolTh ...

19. c3po + hibernate + oracle causing APPARENT DEADLOCK!!!    forum.hibernate.org

Author Message prats Post subject: c3po + hibernate + oracle causing APPARENT DEADLOCK!!! Posted: Tue Apr 22, 2008 5:11 pm Newbie Joined: Mon Mar 31, 2008 2:37 pm Posts: 6 Location: Seattle I am trying to initialize hibernate session factory using c3po to connect to oracle database and my unit test fails on the line when the hibernate session ...

20. c3p0 - APPARENT DEADLOCK errors    forum.hibernate.org

Newbie Joined: Thu Jun 14, 2007 4:19 pm Posts: 6 Hello Hibernate version: 3.2.6 GA Mapping documents: Code: false oracle.jdbc.OracleDriver jdbc:oracle:thin:@chmiel.somwhere.com:1521:mz?database ...

21. c3p0 apparent deadlock / creating emergency threads    forum.hibernate.org

Newbie Joined: Tue Oct 28, 2008 4:02 pm Posts: 1 Location: Saint Paul, US Looks like I'm getting the same problem that is around for a long-long time... One of our programs is using c3p0 (Manifest-Version: 1.0 Ant-Version: Apache Ant 1.7.0 Created-By: 1.5.0_07-87 ("Apple Computer, Inc.") Extension-Name: com.mchange.v2.c3p0 Specification-Vendor: Machinery For Change, Inc. Specification-Version: 1.0 Implementation-Vendor-Id: com.mchange Implementation-Vendor: Machinery For Change, ...