Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Inputting into sql database from jsp problem

Options
  • 11-11-2008 10:47am
    #1
    Registered Users Posts: 2,456 ✭✭✭


    Hey guys, i have a question. I have been trying to input information from a jsp page to an oracle database and everytime i do i get a nullpointerexception. Can someone help. i think where i am getting the problem is where i'm trying to parse.any help would really be appreciated.


Comments

  • Registered Users Posts: 1,996 ✭✭✭lynchie


    Your stack trace will tell you what line it is failing on. Check where the generated sources are and it will tell you what line is causing it.

    Alternatively, start putting System.out.println("DEBUG"); in your jsp file before and after the lines u think are causing the issue, it will narrow down the location.

    From a quick glance...
    Integer.parseInt() will throw NPE if either customerid or repid are null, check to see if they are null or not.
    After that either your DS or Connection are null.


  • Registered Users Posts: 610 ✭✭✭nialo


    At a glance your datasource is not initialized and id guess thats why your getting a null pointer.


Advertisement