-->
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: Unable to reconnect to DB after DB restart
PostPosted: Fri Jan 25, 2013 3:30 am 
Newbie

Joined: Fri Jan 25, 2013 3:25 am
Posts: 5
I have implemented hibernate in my web application to access oracle 10g database.

When my application is in running state I restarted my database service(Oracle).



Then my application is throwing exception given below:

java.sql.SQLException: No more data to read from socket



But my SessionFactory object still exist.

calling openSession() on sessionfactory is also fine.

This exception is coming while i m retriving a record from a table (example query.uniqresult())

I think its unable to reconnect to database.



please give me a solution.



Thanks,

Padmanabha.


Top
 Profile  
 
 Post subject: Re: Unable to reconnect to DB after DB restart
PostPosted: Mon Feb 11, 2013 12:56 am 
Newbie

Joined: Fri Jan 25, 2013 3:25 am
Posts: 5
Hi all ,
I found the solution to my previous post.
The following configuration solved my problem

<property name="hibernate.dbcp.validationQuery">SELECT 1 FROM DUAL</property>
<property name="hibernate.dbcp.testOnBorrow">true</property>


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.