-->
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: Exception in hibernate3 relating to timeout - Mysql
PostPosted: Fri Feb 25, 2011 2:40 am 
Newbie

Joined: Fri Feb 25, 2011 2:34 am
Posts: 11
Hi
Help me i am encountering an error ,

i ran the code on server it was fine , strangely next day it keep on giving this error till i restart tomcat.

Code:
The last packet successfully received from the server was 54,880,316 milliseconds ago.  The last packet sent successfully to the server was 54,880,317 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.


and then

Code:
No operations allowed after connection closed.Connection was implicitly closed by the driver.

I have searched a lot on net and added the following properties on hibernate.cfg.xml, as people there were suggesting this,but of no use.
Code:
<!-- Sessions and transactions -->
<!-- Use the C3P0 connection pool provider -->
<property name="hibernate.c3p0.min_size">5</property>
<property name="hibernate.c3p0.max_size">20</property>
<property name="hibernate.c3p0.timeout">300</property>
<property name="hibernate.c3p0.max_statements">50</property>
<property name="hibernate.c3p0.idle_test_period">3000</property>
<property name="current_session_context_class">thread</property>




Pl. help me.
I have used hibernate3 with myeclipse as the development environment, and am using mysql 5.x and centos (Linux) with Tomcat 5.x
--
Thanks and kind Regards,
Abhishek jain


Top
 Profile  
 
 Post subject: Re: Exception in hibernate3 relating to timeout - Mysql
PostPosted: Wed Mar 02, 2011 3:29 pm 
Newbie

Joined: Fri Feb 25, 2011 2:34 am
Posts: 11
Hi All,
Pl someone reply to this thread , can i use mysql as the database without the connection timeout error,
if yes how?

thanks
abhishek


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.