That exception tells me that the query returned zero records (not one record, but zero). Calling "rs.next()" moved the result set cursor to the end of file, since there were no records. Then trying to use the record at that cursor location caused the exception to be thrown.
As for making sure the result set is closed,
you should put the "rs.close()" call, and the others, into a finally block. Here's a link to Sun's tutorial about that:
The finally Block