• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

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

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
pay attention to your exception stack trace ...
 
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 231
Tomcat Server Notepad Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67641
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

lisy jessica wrote: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.


Hi I have that error too and Im trying to same thing as you do I have oracle database which I'm trying to print tables in my database plus I added jar files (ojdbc6) .
 
What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic