[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - using hibernate with mysql and option skip-networking

vlad2005 do-not-reply at jboss.com
Sat Dec 13 03:53:15 EST 2008


I want to use hibernate with mysql, using option skip-networking.
My hibernate.cfg is like this:

  | <hibernate-configuration>
  |     <session-factory>
  |       	<property name="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
  |         <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
  |         <property name="hibernate.connection.password">xxxx</property>
  |         <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/test</property>
  |         <property name="hibernate.connection.username">xxxx</property>
  |         <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
  |         <property name="hibernate.cache.use_query_cache">true</property> 
  | 		<property name="hibernate.cache.use_second_level_cache">true</property> 
  | 		<property name="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</property> 
  |         <property name="connection.shutdown">true</property>
  |         <property name="c3p0.min_size">5</property>
  | 		<property name="c3p0.max_size">100</property>
  | 		<property name="c3p0.timeout">100</property>
  | 		<property name="c3p0.max_statements">50</property>
  | 		<property name="c3p0.idle_test_period">30</property>
  |         <property name="show_sql">true</property>
  |         <property name="current_session_context_class">thread</property>
  |            </session-factory>
  | </hibernate-configuration>
  | 
At startup i receive this error:

  | 09:32:18,169 WARN  [ThreadPoolAsynchronousRunner] com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector at 67f6dc61 -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
  | 09:32:18,179 WARN  [ThreadPoolAsynchronousRunner] com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector at 67f6dc61 -- APPARENT DEADLOCK!!! Complete Status:
  |         Managed Threads: 3
  |         Active Threads: 3
  |         Active Tasks:
  |                 com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask at 6cd9c6e2 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0)
  |                 com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask at 4d905742 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1)
  |                 com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask at 3f50d5d6 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2)
  |         Pending Tasks:
  |                 com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask at 5406f513
  |                 com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask at 14c3dd7e
  | Pool thread stack traces:
  |         Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1,5,jboss]
  |                 java.net.PlainSocketImpl.socketConnect(Native Method)
  |                 java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
  |                 java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
  |                 java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
  |                 java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
  | 
If comment option skip-networking in my.cnf, everything work well.
How can be resolved?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4196341#4196341

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4196341



More information about the jboss-user mailing list