-->
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.  [ 3 posts ] 
Author Message
 Post subject: Can not connect to Database in Next Day
PostPosted: Fri Jul 25, 2008 10:32 am 
Newbie

Joined: Thu Apr 19, 2007 12:47 am
Posts: 6
Hi,

I am using MySQL database for my hibernate application. Its working fine on first day, but next day (After 8 hours) when i am sending any request then in first request i am getting exception and in second request its wroking fine.

I have implemented hibernate application using Annotations based API and using EntityManager.

My Database Connections Properties are :

<property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver" />
<property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/mywayinteractive_db?autoReconnect=true" />
<property name="hibernate.connection.username" value="root" />
<property name="hibernate.connection.password" value="admin" />

So, When first request is coming to server i am getting below exception but when second request is coming to server then its working fine.

java.net.SocketException
MESSAGE: Software caused connection abort: recv failed

STACKTRACE:

java.net.SocketException: Software caused connection abort: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)

So, what is that ? pls reply me.

Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 25, 2008 1:54 pm 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
Do you have a firewall? Perhaps the firewall or proxy is timing out the connection before your database is? Is there a time limit on connections through the proxy?

Just a shot in the dark, but I've seen that cause problems.

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 29, 2008 11:22 am 
Newbie

Joined: Thu Apr 19, 2007 12:47 am
Posts: 6
No. firewall is off. proxy is there. And i haven't specify any time limit.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.