Results 1 to 1 of 1
  1. #1
    Join Date
    Aug 2003

    Unanswered: executeQuery causes NullPointerException with jdk1.4 and not jdk1.3

    I have a small application running on tomcat-4.0.6. It was originally written with jdk1.3 and it worked fine. When I moved it to jdk1.4 the same code caused NullPointerException. On debugging it looked like,

    ResultSet r = stmt.executeQuery(sql1.toString());


    PreparedStatement prst = con.prepareStatement(sql1.toString(), ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
    ResultSet r = prst.executeQuery();

    caused the NullPointerException. There are other classes where I have used this code and it seems to be working fine. I have checked to see if already open statement & connection have been closed etc. Has anyone else seen this happen. What is a work around/ solution for this.


    PS : should have mentioned earlier. I am using MSAccess and JDBCODBC connection.
    Last edited by hvfms; 08-28-03 at 15:19.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts