Good day.! I am working with hibernate, ICEfaces, mysql and netebeans 6.5.1. I have reviewed some forums but I still have the same problem. I have configured hibernate hibernate.cfg.xml file with C3P0, but the communication error keeps returning. I have tested with hibernate 3.2.6 and the latest versions. I have also tested with AutoReconnect = true, but the error persists. What am I doing wrong? hibernate.cfg.xml file attached
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory name="session_sgh_glass"> <!-- Database connection settings --> <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/bd?autoReconnect=true</property> <property name="hibernate.connection.username">user</property> <property name="hibernate.connection.password">pass</property>
<property name="dialect">org.hibernate.dialect.MySQLInnoDBDialect</property> <property name="hibernate.current_session_context_class">thread</property>
<property name="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property> <!-- configuration pool via c3p0--> <property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property> <property name="hibernate.connection.is-connection-validation-required">true</property> <property name="hibernate.c3p0.acquire_increment">1</property> <property name="hibernate.c3p0.idle_test_period">100</property> <property name="hibernate.c3p0.timeout">100</property> <property name="hibernate.c3p0.min_size">5</property> <property name="hibernate.c3p0.max_size">50</property> <property name="hibernate.c3p0.max_statements">50</property> <property name="hibernate.c3p0.preferredTestQuery">select 1;</property> <property name="hibernate.c3p0.testConnectionOnCheckout">true</property> <!-- Disable second-level cache. --> <property name="hibernate.cache.provider_class">org.hibernate.cache.NoCacheProvider</property> <property name="hibernate.cache.use_query_cache">false</property> <property name="hibernate.cache.use_minimal_puts">false</property> <property name="hibernate.max_fetch_depth">3</property> <mapping resource=""/> </session-factory> </hibernate-configuration>
|