• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Null pointer Exception while inserting values in to DB

 
V Praveen
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am using tomcat 5.0.19 and oracle9i with thin driver.
Up on trying to insert form values of a JSP page in to DB I am getting null pointer exception.(The data is getting inserted but exception is coming)
Also I am facing the same problem while trying to retrieve values from a table that match a condition.(Duplicate user check)

My JSP page is not showing any out put.
In the console I am getting a null pointer exception message of the catch
block.
Please help me to solve this problem.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64178
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, if the code is in the JSP, refactor it to a separate class. This will only get you started following modern standards, it will make such problems much easier to diagnose.

The stack trace should tell you what line created the problem. Inspect that line to see how any of the references might be null.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic