• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SQLException: ResultSet Exhuasted

 
Ranch Hand
Posts: 647
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have below code that is working fine in prod.


I moved the project from Starteam/ant to maven/mercurial.
Now when I am trying to test the new maven package and try to test above piece of code, I get the error
SQLException"ResultSet exhuasted.

The code has not been changed. Nothing has been changed on DB side.
I use ojdbc.jar

Does not make sense that abbove code works fine with old way of packaging and returns error when moved to maven pacakging.

Can some one give any pointes?
I googled for the error and I see that generally when the resultset is closed and one tries to access it , you get the error.
Also When you don't do resultset.next you get above error.

Any pointers please.

thanks
Trupti
 
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you give us the exact error output, and if possible the code line where it is happening ?

Were you using ojdbc.jar too in the past?

What do the super.close....() methods do?

Regards, Jan
 
trupti nigam
Ranch Hand
Posts: 647
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I try to run the code in debug mode All I see that when I hit the line


The control goes to finally block. looks like reportResult.next() is false.
and when I click on the below line inside (add watch) window I see SQL Exception:resultset exusted.


But actually the code is not throwing the SQLException cause my code runs fine but does not return any records from DB even though valid data is ther. If I run same query from toad it returns data.

super.close has below code inside it.

 
Jan Cumps
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do I understand correctly that :
  • It does not throw "SQLException: ResultSet Exhausted"?
  • And that SELECT * from trades WHERE market_id= ? AND order= ? returns no record?
  • And TOAD does return a record for the same query?


  • Then check if you are connecting to the same database / schema, with the same user account.
    Can you print the value of dealQuery for us, and can you show us your TOAD query?
     
    Don't get me started about those stupid light bulbs.
    reply
      Bookmark Topic Watch Topic
    • New Topic