| Author |
unexpected exception
|
Asher Tarnopolski
Ranch Hand
Joined: Jul 28, 2001
Posts: 260
|
|
hey folks, from time to time one of my servlets throws a nullpointerexception with this tree: i can't understand from the exception message if this is a problem of code, but in any case the exception is thrown from time to time and not always... yeh, the servlet runs on tomcat 4.0.
|
Asher Tarnopolski
SCJP,SCWCD
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12268
|
|
What do you find when you look up line 673 in source code for the StandardWrapper class, org.apache.catalina.core package? That might give you a clue. Bill
|
 |
Bruce Jin
Ranch Hand
Joined: Sep 20, 2001
Posts: 666
|
|
|
exam all the log files in logs folder you may find more useful debug info.
|
BJ - SCJP and SCWCD
We love Java programming. It is contagious, very cool, and lot of fun. - Peter Coad, Java Design
Crazy Bikes created by m-Power
|
 |
Asher Tarnopolski
Ranch Hand
Joined: Jul 28, 2001
Posts: 260
|
|
well, i'll take a look on the log files later. i can't see the 673 line of the source code. it's one of the tomcat classes, and i don't have the source code. i found out that this exception is thrown if i recompile a servlet and try to run it again without restarting tomcat. so, at least i know how to deal with it now
|
 |
Bruce Jin
Ranch Hand
Joined: Sep 20, 2001
Posts: 666
|
|
i found out that this exception is thrown if i recompile a servlet and try to run it again without restarting tomcat
I suspect that your servlet uses other objects and does not handle objects creation properly. When a servlet is refreshed, other servlet/classes may also get destroyed. Do you store objects in session?
|
 |
Asher Tarnopolski
Ranch Hand
Joined: Jul 28, 2001
Posts: 260
|
|
yeh, it uses sessions and db connectivity, but as you see the exception is not thrown by a code itself, but by tomcat... in any case, in production noone will recompile the servlet , and for sure not when it's running.
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12268
|
|
Well then - download the source code - its free and even fairly well annotated. Bill
|
 |
 |
|
|
subject: unexpected exception
|
|
|