Meaningless Drivel is fun!*
The moose likes JSP and the fly likes Null pointer Exception while inserting values in to DB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Null pointer Exception while inserting values in to DB" Watch "Null pointer Exception while inserting values in to DB" New topic
Author

Null pointer Exception while inserting values in to DB

V Praveen
Greenhorn

Joined: Jun 02, 2008
Posts: 1
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

Joined: Jan 10, 2002
Posts: 61224
    
  66

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: Null pointer Exception while inserting values in to DB