-->
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: hibernate SQLQuery locked
PostPosted: Fri Apr 03, 2009 8:06 pm 
Newbie

Joined: Fri Apr 03, 2009 7:52 pm
Posts: 2
Hi,

I am new in hibernate.

My problem is that in the following code, the SQLQuery, executed by the getList() method, stay locked and never returns. But when I execute the sqlquery in the console of the oracle client (PL/SQL Developer), no problem occurs. No problem occurs when I use pure JDBC to execute the same query of the getList() method.

Does anybody knows why in hibernate the SQLQuery stay locked??

please, help me!!!!

Thanks!!


Hibernate version: 3.1

Code between sessionFactory.openSession() and session.close():

int count = getDao(session).getCount();

if (count != 0) {
List l = getDao(session).getList();
}


Full stack trace of any exception that occurs:

Name and version of the database you are using:Oracle 10g


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 05, 2009 1:04 pm 
Newbie

Joined: Fri Apr 03, 2009 7:52 pm
Posts: 2
Hi,

the method getResultSet of the Batcher instance stay locked when ps.executeQuery() is executed, and never returns, but when I use JDBC, instead of hibernate, to execute the same query, no problem occurs.

why this happens in hibernate???

thanks!!

Code:
public ResultSet getResultSet(PreparedStatement ps) throws SQLException {

      ResultSet rs = ps.executeQuery();

      resultSetsToClose.add(rs);

      logOpenResults();

      return rs;
}


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.