-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Autoreconnect & Error
PostPosted: Mon Nov 26, 2012 3:59 am 
Newbie

Joined: Fri Nov 23, 2012 5:18 am
Posts: 2
Hello,

can anybody help me with this error?

It's a Java Application, connecting with hibernate. Autoreconnect = true doesnt work. I get this error every day.

Error 1:
Quote:
JDBCExceptionReporter.java:78 | The last packet successfully received from the server was 128.768.593 milliseconds ago. The last packet sent successfully to the server was 128.768.593 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.


Error 2:
Quote:
JDBCExceptionReporter.java:78 | No operations allowed after connection closed.Connection was implicitly closed by the driver.


hibernate.cfg

Code:
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
    <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
    <property name="hibernate.connection.url">jdbc:mysql://url/db</property>
    <property name="hibernate.connection.username">user</property>
    <property name="hibernate.connection.password">pw</property>
    <property name="hibernate.connection.pool_size">20</property>
    <property name="hibernate.current_session_context_class">thread</property>
    <property name="hibernate.dbcp.initialSize">20</property>
    <property name="hibernate.dbcp.maxActive">20</property>
    <property name="hibernate.dbcp.maxIdle">20</property>
    <property name="hibernate.dbcp.minIdle">0</property>
    <property name="hibernate.dbcp.testOnBorrow">true</property>
    <property name="hibernate.dbcp.validationQuery">SELECT 1</property>
    <property name="hibernate.show_sql">false</property>


Top
 Profile  
 
 Post subject: Re: Autoreconnect & Error
PostPosted: Fri Feb 08, 2013 9:07 am 
Newbie

Joined: Fri Feb 08, 2013 9:02 am
Posts: 1
probably is missing

<property name="hibernate.dbcp.maxWait">2000</property>

in hibernate.cfg


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.