0 Replies Latest reply on Dec 13, 2008 3:53 AM by Fratiman Vladut

    using hibernate with mysql and option skip-networking

    Fratiman Vladut Newbie

      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@67f6dc61 -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
      09:32:18,179 WARN [ThreadPoolAsynchronousRunner] com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@67f6dc61 -- APPARENT DEADLOCK!!! Complete Status:
       Managed Threads: 3
       Active Threads: 3
       Active Tasks:
       com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@6cd9c6e2 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0)
       com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@4d905742 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1)
       com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@3f50d5d6 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2)
       Pending Tasks:
       com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@5406f513
       com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@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?