Hi,
I've a problem with GWT 1.5.3, Gilead, Hibernate 3 & Mysql 5. The
problem is the same of many others people and is about the timeout of
connections to the database that are closed after some hours.
In particular after some hours when I try to list data on my
application is raised this error:
09:12:38,104  WARN JDBCExceptionReporter:100 - SQL Error: 0, SQLState:
08S01
09:12:38,104 ERROR JDBCExceptionReporter:101 - Communications link
failure

Last packet sent to the server was 63 ms ago.
org.hibernate.exception.JDBCConnectionException: could not execute
query
        at org.hibernate.exception.SQLStateConverter.convert
(SQLStateConverter.java:97)
        at org.hibernate.exception.JDBCExceptionHelper.convert
(JDBCExceptionHelper.java:66)
        at org.hibernate.loader.Loader.doList(Loader.java:2231)
        at org.hibernate.loader.Loader.listIgnoreQueryCache
(Loader.java:2125)
        at org.hibernate.loader.Loader.list(Loader.java:2120)
        at org.hibernate.loader.criteria.CriteriaLoader.list
(CriteriaLoader.java:118)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1596)
        at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)
        at it.pianetatecno.pianetabarche.server.dao.NewsDao.cercaNews
(NewsDao.java:127)
        at it.pianetatecno.pianetabarche.server.ServiceImpl.cercaNews
(ServiceImpl.java:112)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.google.gwt.user.server.rpc.RPCCopy_GWT15.invoke
(RPCCopy_GWT15.java:563)
        at com.google.gwt.user.server.rpc.RPCCopy.invoke(RPCCopy.java:
134)
        at net.sf.gilead.gwt.PersistentRemoteService.processCall
(PersistentRemoteService.java:149)
        at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
(RemoteServiceServlet.java:86)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:
710)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:
803)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:175)
        at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:263)
        at org.apache.coyote.ajp.AjpAprProcessor.process
(AjpAprProcessor.java:419)
        at org.apache.coyote.ajp.AjpAprProtocol
$AjpConnectionHandler.process(AjpAprProtocol.java:394)
        at org.apache.tomcat.util.net.AprEndpoint$Worker.run
(AprEndpoint.java:1508)
        at java.lang.Thread.run(Thread.java:619)
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure


I'm using c3p0 and my hiberntate.cg.xml is:

<hibernate-configuration>
    <session-factory>

        <!-- Database connection settings -->
        <!-- MySQL -->
        <property
name="connection.driver_class">com.mysql.jdbc.Driver</property>
        <property name="connection.url">jdbc:mysql://
192.168.1.101:3306/pianetabarche</property>
        <property name="connection.autoReconnect">true</property>
        <property name="connection.autoReconnectForPools">true</
property>
        <property name="connection.is-connection-validation-
required">true</property>
        <property name="connection.username">user</property>
        <property name="connection.password">psw
        </property>


        <property
name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</
property>
        <property name="c3p0.acquire_increment">1</property>
        <property name="c3p0.idle_test_period">14400</property>
        <property name="c3p0.max_size">100</property>
        <property name="c3p0.max_statements">0</property>
        <property name="c3p0.min_size">10</property>

        <property name="hibernate.c3p0.idle_test_period">14400</
property>
        <property name="hibernate.c3p0.max_size">100</property>
        <property name="hibernate.c3p0.max_statements">0</property>
        <property name="hibernate.c3p0.min_size">10</property>
        <property name="hibernate.c3p0.timeout">25200</property>

        <!-- SQL dialect -->
        <property
name="dialect">org.hibernate.dialect.MySQLInnoDBDialect
        </property>

        <property
name="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory
        </property>
        <property name="current_session_context_class">thread
        </property>

        <!-- Disable the second-level cache  -->
        <property
name="cache.provider_class">org.hibernate.cache.NoCacheProvider
        </property>
        <property name="hibernate.cache.use_query_cache">false
        </property>

        <!-- Echo all executed SQL to stdout -->
        <property name="show_sql">false</property>
        <property name="format_sql">true</property>
        <property name="use_sql_comments">true
        </property>

        <property name="hbm2ddl.auto">update</property>
        <mapping class="Class1"/>
        <mapping class="Class2"/>
    </session-factory>
</hibernate-configuration>

I've made many test but it doesn't work!!

Any suggestion?

Thanks

Regards
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to