This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 29446 - ClassNotFoundException thrown on startup is swallowed by the monitor
Summary: ClassNotFoundException thrown on startup is swallowed by the monitor
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Tomcat (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: Petr Jiricka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-10 22:20 UTC by Ana.von Klopp
Modified: 2006-02-28 11:26 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ana.von Klopp 2002-12-10 22:20:47 UTC
The monitor filter and valves are designed in such a way that they 
propagate any exceptions thrown while a request is processed and rethrow 
it after they have finished processing. This is to ensure that the 
developer sees all error messages from the server in the same way as if the 
monitor was not installed. 

However, it turns out that I forgot to do 
this for the one case where the MonitorValve tries to get hold of the 
servlet, and the developer has forgotten to put the class in the 
classpath. This needs to be propagated also. 

To reproduce: 

1. 
Create a web module. 
2. Add a servlet using the wizard. 
3. Modify the 
servlet so that it does something. 
4. Delete the servlet, but not the dd 
entry.
5. Deploy the web module and access the servlet. Nothing 
happens. 

Jason, please add this scenario to the tests. 

Ana
Comment 1 Ana.von Klopp 2002-12-10 22:21:16 UTC
Modify the valve so that the exception is thrown. 
Comment 2 Ana.von Klopp 2003-01-31 00:40:46 UTC
Eh... I filed this against myself too soon. 




It turns out that the DispatchListener has nothing to do 
with this, and the Valve propagates execeptions as is. 
Instead, the problem is with the IdeJSPServlet - I see the 
same behaviour if I disasble the monitor while toggling the 
integration mode to full or minimum. 




The reason I filed this bug was a report on nbusers - a 
user complained that the resource not found message is less 
helpful than seeing the actual exception. I would recommend 
that we at least print the exception to the log file even 
if we continue printing the same message in the browser. 




I assume that this problem will go away entirely after we 
change how the IDE compiles JSP, so feel free to say that 
this will be fixed as part of the new compilation 
architecture. 
Comment 3 _ rkubacki 2003-01-31 08:34:42 UTC
If I understand correclty the idea is to log exception from
IdeJspServlet beside of sending the stack trace to browser. Is that right?
Comment 4 Ana.von Klopp 2003-02-03 17:56:07 UTC
Right now it looks like the stack trace is not sent to the 
browser. You just get the Apache error page w/o the stack 
trace. I think the user's problem was that the exception 
wasn't available from anywhere (neither the log, nor the 
browser). 


Comment 5 akemr 2003-02-24 16:00:42 UTC
This one issue is evaluated IMO.
Comment 6 Petr Jiricka 2003-02-27 20:23:04 UTC
I believe it may be neither the valve's fault, nor the 
IDEJspServlet's fault. It can hardly be IDEJspServlet 
swallowing the exception, because it is not called at all 
for servlets - only for JSPs. As Ana confirmed, this does 
not look like the monitor's fault either.

This may be related to the following Tomcat behavior: when 
the page is requested for the first time, Tomcat reports 
the whole stack trace of the exception. On subsequent 
requests, it only outputs the header without the exception 
stack trace.

In fact, I see this behavior consistently in both full and 
mininal integration mode. Also, in both cases the 
exception is written into the server log, which may serve 
as a lead as to why the servlet was not loaded.
Comment 7 Ana.von Klopp 2003-02-27 21:44:29 UTC
I am the submitter so I guess I'm OK with closing this one. 
I submitted it in response to a request on nbusers. The 
person who reported it hasn't updated the bug and probably 
isn't receiving notification. Perhaps the really polite 
thing would be to follow up on the original request... I'll 
see if I can find it. 
Comment 8 Petr Jiricka 2003-03-03 10:40:46 UTC
We may want to close this as invalid, but first let's file 
a Tomcat bug. When that's done, we can close this. 

Setting target milestone to 4.0.

Comment 9 Petr Jiricka 2004-01-28 20:44:24 UTC
Still reproducible in NetBeans 3.6.
Comment 10 Petr Jiricka 2004-07-26 19:40:08 UTC
I think the behavior is better now - I can see the exception in the
browser. Maybe an improvement in Tomcat 5.0.27 ?
Comment 11 Petr Jiricka 2004-08-10 17:27:26 UTC
Per previous comment, I think this is fixed.
Comment 12 Jaroslav Pospisil 2006-02-28 11:26:56 UTC
VERIFIED