• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.sql.SQLException: Exhausted Resultset

 
Jinal Jhaveri
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

When I try to stress test my servlet with lots of request (clicks), I get the java.sql.SQLException: Exhausted Resultset exception. Anyways to solve this problem?
 
Howard Watson
Ranch Hand
Posts: 63
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jinal,

I tried a search on Exhausted Resultset exception and got some hits. Did any of these apply to you?
 
Jinal Jhaveri
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No not yet
 
Sonny Gill
Ranch Hand
Posts: 1211
IntelliJ IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post some code, mate, and if there is a logical error in it, somebody may be able to spot it.
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jinal,

How may records are resultset is containing.
what is record count ???
 
monu garg
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Jinal , i was getting same error few days back.
What you maybe doing here is opening too much resultsets without closing them.Sometimes its not immediately visible, since u maybe doing it somewhere
recursively.
So try to close result sets as soon as possible.


Monu G
 
Jinal Jhaveri
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks everybody. I just found my own post and thought would post the solution. The problem was because my application was not multithreaded. I had some global variables. After making them local, everything worked fine!
 
Pankaj Patel
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use : next() method of Resultset.
Reason : resultset.next() Returns Advances the record cursor by one record. Returns a boolean value indicating success or failure. Failure occurs if the cursor moved ...


I was solving the same problem and resolved it through this.

-----------------------------------------------
Pankaj Patel.
SCJP 1.5
Enjoy the world of Programming...
-----------------------------------------------
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic