This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes null pointer exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "null pointer exception" Watch "null pointer exception" New topic
Author

null pointer exception

Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
When I run the following code, I get this for output:
test2=after certifications
dates=[Ljava.lang.String;@116ab8
test1=beginning
alumniID=532797326
before calling certs=certs
error=java.lang.NullPointerException
before calling skills=sk
test3=after dates


If I comment out any references to req that occur after calling writeSkills, the program works. It seems that somewhere req is being set to null. Is there anything that I am missing?


Matthew Phillips
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
I found the problem. I was not accounting for getParameterValues returning null.
 
wood burning stoves
 
subject: null pointer exception
 
Similar Threads
JSP SQL String: Too long?
problem with code
Logic problem
A page not found error
invalid cursor state