File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes while ( not stopping at EOF. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "while ( not stopping at EOF." Watch "while ( not stopping at EOF." New topic

while ( not stopping at EOF.

Brian K Swingle
Ranch Hand

Joined: Jun 20, 2003
Posts: 39
Hello all,
I am using a MySql database. and am using a while( statement to loop through the result set. i watch tomcats activity through a command prompt window. I have a System.out.println(""+RecordNumber+""); set up so i can see what record number the Resultset is on. my table has 1962 records and after the Resultset loops unitl it hits record number 1962 it errors with java.lang.NullPointerException . I'm guessing that it means the ResultSet is trying to move to the next record but there isn't one. Can anyone give me any ideas as to why this might be happening. The servlet just started doing this. Any help is greatly appreciated.
Joe Ess

Joined: Oct 29, 2001
Posts: 9189

How's about sharing the exact code that is giving you a problem?

[How To Ask Questions On JavaRanch]
I agree. Here's the link:
subject: while ( not stopping at EOF.
It's not a secret anymore!