-->
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.  [ 4 posts ] 
Author Message
 Post subject: Hibernate + Oracle 9i Connection Closed Problem
PostPosted: Tue Jan 02, 2007 5:37 am 
Newbie

Joined: Tue Jan 02, 2007 5:26 am
Posts: 7
Location: London
Hello,
We are using Hibernate 3 to handle transactions with an Oracle 9i database located on a server somewhere in the country.
After a few hours during the night, the connection goes idle and closes, hence we get the following errors

2006-12-30 17:04:36,753 [Thread-2953] WARN - (JDBCExceptionReporter.java:logExceptions:71)- SQL Error: 17002, SQLState: null
2006-12-30 17:04:36,754 [Thread-2953] ERROR - (JDBCExceptionReporter.java:logExceptions:72)- Io exception: Connection reset

Is there anyway we can fix this at our application end i.e, in the Hibernate config or is it an Oracle problem because we didnt see this problem previously when we were using HSQLDB.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 02, 2007 5:51 am 
Newbie

Joined: Mon Dec 25, 2006 3:14 pm
Posts: 18
which connection pool you are using. Try using commons-dbcp, that can be configured to detect if the connection is live.
http://jakarta.apache.org/commons/dbcp/ ... ation.html


Top
 Profile  
 
 Post subject: Default Hibernate Config
PostPosted: Tue Jan 02, 2007 6:16 am 
Newbie

Joined: Tue Jan 02, 2007 5:26 am
Posts: 7
Location: London
Hi, we are using a default config. i.e, the default hibernate.cfg.xml. Our Parameters are shown below.
<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@ORACLEDATABASEURL</property>
<property name="hibernate.connection.username">username</property>
<property name="hibernate.connection.password">password</property>
<property name="hibernate.connection.pool_size">10</property>
<property name="show_sql">false</property>

<property name="current_session_context_class">thread</property>
<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>

Is it not possible to set the required parameter in the default


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 04, 2007 6:43 am 
Newbie

Joined: Tue Jan 02, 2007 5:26 am
Posts: 7
Location: London
Hello, does anyone know if a solution would be to put the autoReconnect value in the url, i.e
ORACLEDATABASEURL?autoReconnect=true


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