• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

org.apache.jasper.JasperException: java.lang.NullPointerException error

 
lisy jessica
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi am getting the following error while running my webapp




Please can anyone help me out. Thanks in advance.

Thanks,
Lissy
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pay attention to your exception stack trace ...
 
J. Kevin Robbins
Bartender
Posts: 1725
19
Chrome Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can ignore the first 6 lines. Line 12 is the key to solving this one. If you can't figure it out, post your code for UserDAO.java and we'll give you another hint.
 
shivam singhal
Ranch Hand
Posts: 231
Java Notepad Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
NULL POINTER EXCEPTION ,, that is your providing response to client ,, and information is NOT RECEIVE by the client ..

check out your code where you are providing final output to client.. the name of the variable whose information you want to be visible to your client,, maches the name of the variable in ABOVE CODE you have store the information..
 
Raja gopal Mani
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You must be using a com.nic.sample.dao.UserDAO object in your jsp having null value on it

Try to handle the null value on your jsp ...

It may give a better understanding to others if you paste the jsp code here, thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64617
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IF you have Java code inside your JSP, you are doing it wrong. Please see this JspFaq entry.
 
lisy jessica
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi My jsp page listuser.jsp




UserDAO.java





I am sorry for the late reply, I still can't fix it,
 
J. Kevin Robbins
Bartender
Posts: 1725
19
Chrome Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without being able to run your code, my best guess is that you are not getting a resultset back on line 70, but it's not obvious to me why. I would set a breakpoint just prior to that line and debug into it to see what's going on.
 
J. Kevin Robbins
Bartender
Posts: 1725
19
Chrome Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
btw, where are you closing the connection? Each of those try-catch blocks should be a try-catch-finally, and the finally block is where you close the statement, the resultset, and the connection.
 
lisy jessica
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks all for the help! I debugged it...got it now. I didn't add oracle jar files. Now it's working. Thanks a lot for the help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic