Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Inputting into sql database from jsp problem

  • 11-11-2008 09:47AM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2, Paid Member Posts: 2,032 ✭✭✭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, Registered Users 2 Posts: 610 ✭✭✭nialo


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


Advertisement