aspose file tools*
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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Null pointer exception" Watch "Null pointer exception" New topic
Author

Null pointer exception

Moses Herrada
Greenhorn

Joined: Jan 22, 2005
Posts: 11
Hey guys i need some help here. Whenever i clicked on the submit button of my servlet, a null pointer exception always appear and ive been trying for hours but i just cant debug it. It says theres something with my DAO class but i tried on the java console i am able to load it onto the database. But when i tried on the servlet it fails .
thanks
Kumar Navin
Ranch Hand

Joined: May 27, 2004
Posts: 52
Just check out if your server is able to load the DAO class or not ???
It might be unavailable.
Moses Herrada
Greenhorn

Joined: Jan 22, 2005
Posts: 11
what do u mean by server unavailable?
Kumar Navin
Ranch Hand

Joined: May 27, 2004
Posts: 52
I mean the DAO class, not the server. Your servlet is being executed on the server and hence the Servlet Engine must have access to all the classes that your servlet is using.
Hope you'll get it now.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Post the full stack trace. Get it from your logs not from the browser.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
Consider Paul's rocket mass heater.
 
subject: Null pointer exception