It can be anything, can you provide a stack trace and more code?
Joined: May 15, 2011
Thank you again for kind help,
Here's more code
Joined: Sep 01, 2005
Statement s is never initialized but you try to close it in your closeDb() method which is generating the NullPointerException since s is null.
After exception your database connection is not closed!!!. You should use finally blocks so that you don't leave any connection open and Exceptions are easy to be determined if you use printStackTrace method of Exception object.