Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Null pointer exception

 
Moses Herrada
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just check out if your server is able to load the DAO class or not ???
It might be unavailable.
 
Moses Herrada
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what do u mean by server unavailable?
 
Kumar Navin
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post the full stack trace. Get it from your logs not from the browser.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic