• Post Reply Bookmark Topic Watch Topic
  • New Topic

NullPointerException Problem

 
mark smith
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • 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 ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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.
 
Scott Duncan
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
  • 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 ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!