• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NullPointerException Problem

 
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi

i use tomcat 5

i have some file

JdbcMVC.jsp

Client - Class

ListeClient class(bean used in the jsp)

TraitementClient class (connect to the database)

ServletJdbcMVC2 servlet( start all processus and send the request to jsp)


i create a Client class (name, adresse...), i use ListeClient to put all Client found. the servlet start processus and send request to jsp. TraitementClient is used to connect to database and fill ListeClient

when i connect to my jsp i got:


any idea?

you can get the file here

thanks
[ April 05, 2005: Message edited by: Bear Bibeault ]
 
Sheriff
Posts: 67746
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
Everything you need to know is here:

at org.apache.jsp.JdbcMVC_jsp._jspService(JdbcMVC_jsp.java:73)



This is the Java file that Tomcat created for you on behalf of your JSP. Go find it (it will be under Tomcat's work folder hierarchy) and look on line 73. That will be what is causing your null pointer exception.

Btw, "Problem" isn't the best subject title. I've beefed it up a bit for you.
 
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah, you have a NullPointer in the JdbcMVC.jsp page. Probably where you are trying to instantiate the Client object:



Either that or client itself is null after instantiation:



But like Bear said, you'll have to go get the compiled jsp page and look on line 72.
[ April 05, 2005: Message edited by: William Duncan ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic