Paul Clapham wrote:That probably means that something was null in a place which can't handle nulls. Unfortunately you don't know where that place is, because when you printed the exception you didn't print that information. So take line 60 and print the stack trace:
(There's no point in printing the word "Error", when you see the stack trace you'll know that an error occurred anyway.)
The stack trace will tell you what line of your code threw the exception, so start there.
Danny Baquilod wrote:java.lang.NullPointerException
at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1235)
at java.text.DateFormat.parse(DateFormat.java:335)
at AddUser.doPost(AddUser.java:80)
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Rob Spoor wrote:
Danny Baquilod wrote:java.lang.NullPointerException
at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1235)
at java.text.DateFormat.parse(DateFormat.java:335)
at AddUser.doPost(AddUser.java:80)
The only parsing I see is that of dateCreate which is initialized here:
This error indicates that dateCreate is null, which means that the parameter is not present.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Beauty is in the eye of the tiny ad.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|