aspose file tools
The moose likes JDBC and the fly likes Exception : ResultSet is closed Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Exception : ResultSet is closed" Watch "Exception : ResultSet is closed" New topic
Author

Exception : ResultSet is closed

Naresh Talluri
Ranch Hand

Joined: Oct 12, 2007
Posts: 115
Hi folks
I have a problem while closing the ResultSet in JDBC.
iam using Postgre DB, here for normal execution it is working fine,
but while we are doing load test at the rate of 30 or 40 hits to the
application on a peak volume it is throwing the error like
"PSQLException:This ResultSet is closed."
can you please let me know what are all the possibilities....
here is my DB releasing code..




All these statements are enclosed in try/catch block...


I really appreciate for any thoughts...

--Naresh

Herman Schelti
Ranch Hand

Joined: Jul 17, 2006
Posts: 387
hi,

change resultset first, then statement, then connection.

Herman
Naresh Talluri
Ranch Hand

Joined: Oct 12, 2007
Posts: 115
Hi
in my code i had put like that only , but while posting
i copy pasted like that...sorry for that one..
No one resource is sharing my application.
but in the normal condition it is working fine but in the peak volume only it is getting trouble...
getDirectoryContents() is the method iam going to call.
the code shown below:



Releasing DB resources :



} catch (SQLException e) {
//new BusinessException("SQLException while trying to closeResultSet in DBAccess: " + e.getMessage(), e.getStackTrace());
}
}

can you please let me know the possibilities to overcome this one...

-Naresh


[ April 08, 2008: Message edited by: Naresh Talluri ]
Naresh Talluri
Ranch Hand

Joined: Oct 12, 2007
Posts: 115
here iam getting this error only on the load test only, not frequently.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Exception : ResultSet is closed
 
Similar Threads
Resultset getting closed. Resultset Already closed exception JZ0R0
Exception : ResultSet is closed
print data to textarea
return JRResultSetDataSource from a DAO ... unable to get next record
java.sql.SQLException: Server configuration denies access to data source