• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error: java.sql.SQLException: After end of result set

 
Rajkumar balakrishnan
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I never came across such error... When i executing my JSP page that uses AJAX to generate report from the values in the DB..this error message is displayed in console....But there is no problem with the page..it works fine... May be a warning??? .... What kinda error this is.. I guess it reaches the End of ResultSet.. and so it throws an error.....Am i right? If not then please explain me what is THIS???
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you call rs.next() and it returns false, then the status of the ResultSet is 'after last', that is it has read the last piece of data and move to a point beyond this.

If you try to read data from a ResultSet at this point, you get the exception you saw.

It is an error in the code, not a warning from the database.
 
Paul Clapham
Sheriff
Posts: 21559
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should really focus on the code that throws the exception. Right now it looks like you are lumping a whole lot of different things into one big confusing ball of string.

You have a JSP which generates a page. That page contains some Javascript which generates an AJAX request. And when the request is processed, there's an exception. (Is that right?)

So, the JSP which generates the page is irrelevant for now. The Javascript is irrelevant for now. All you have to look at is the code which threw the exception and find out why it did that. (My guess is that you have a query which returned zero records and you assumed it would return one or more, but that's just a guess. Look at the code yourself.) Once you know that, then you can start fixing whatever caused the problem.
 
Rajkumar balakrishnan
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Paul Clapham:
You should really focus on the code that throws the exception. Right now it looks like you are lumping a whole lot of different things into one big confusing ball of string.

You have a JSP which generates a page. That page contains some Javascript which generates an AJAX request. And when the request is processed, there's an exception. (Is that right?)

So, the JSP which generates the page is irrelevant for now. The Javascript is irrelevant for now. All you have to look at is the code which threw the exception and find out why it did that. (My guess is that you have a query which returned zero records and you assumed it would return one or more, but that's just a guess. Look at the code yourself.) Once you know that, then you can start fixing whatever caused the problem.


Its awesome??? its right Paul.... I wonder how you find this... Ok..thats why you are a bartender i think... I have a query which returns zero and what should i do to fix the error.....Please let me know how to fix it..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic