Bug 40016 - SEVERE: Error filterStart
Summary: SEVERE: Error filterStart
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 5.5.9
Hardware: PC Windows XP
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-11 15:44 UTC by Gili
Modified: 2008-11-23 01:10 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gili 2006-07-11 15:44:21 UTC
If a servlet filter throws an exception inside its init() method, Tomcat outputs:

SEVERE: Error filterStart

which isn't very useful for tracking down the problem (in fact, it isn't even
clear which class/method had the problem).

I am expecting Tomcat to display a stack-trace of the exception being thrown. As
a workaround, I have to manually surround code in all my filters with try-catch
blocks and manually print out the stack-trace in case of errors.
Comment 1 Yoav Shapira 2006-12-26 07:33:25 UTC
This is already done: see the filterStart method in
org.apache.catalina.core.StandardContext.  It will log the filter name and
complete stack trace, at ERROR level, for every filter that fails.

You can also enable DEBUG-level logging to see the filters getting started every
time the server starts.  If you don't want to have DEBUG-level logging on the
whole server, enable it only for the above StandardContext class.
Comment 2 Abie A.Joseph 2008-02-07 01:19:09 UTC
(In reply to comment #0)
> If a servlet filter throws an exception inside its init() method, Tomcat 
outputs:
> 
> SEVERE: Error filterStart
> 
> which isn't very useful for tracking down the problem (in fact, it isn't even
> clear which class/method had the problem).
> 
> I am expecting Tomcat to display a stack-trace of the exception being thrown. 
As
> a workaround, I have to manually surround code in all my filters with try-
catch
> blocks and manually print out the stack-trace in case of errors.

I've spent some couple of days behind this problem...but no solution as of 
yet...is there any solution to this bug?...But in the first place i dont 
understand why did i get this error? what may have went wrong in the 
tomcat(5.5.23) im using(with struts1.1)?. Also no stack trace for this error 
which is even more frustrating.
Comment 3 Peter Rossbach 2008-02-07 01:30:34 UTC
To better analyse your problem  setup a InstanceListener at your context.

<Context>
<InstanceListener>org.example.yourInstanceListener</InstanceListener>
</Context>

A context InstanceListener are notify INIT, BEFORE, AFTER cycle...

Setup your InstanceListener class at common/classes.
Comment 4 Abie A.Joseph 2008-02-07 03:01:48 UTC
(In reply to comment #3)
> To better analyse your problem  setup a InstanceListener at your context.
> 
> <Context>
> <InstanceListener>org.example.yourInstanceListener</InstanceListener>
> </Context>
> 
> A context InstanceListener are notify INIT, BEFORE, AFTER cycle...
> 
> Setup your InstanceListener class at common/classes.

Its getting worse n worse...now my even my jsp pages have gone to 
sleep...thanks to this tomcat bug...the error that im getting is 
Exception creating bean of class publicity.abc : 
java.lang.ClassNotFoundException: 
in my <html:form> attribute...why has this stopped working....has some jar file 
got truncated.....

Comment 5 Abie A.Joseph 2008-02-07 04:18:35 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > To better analyse your problem  setup a InstanceListener at your context.
> > 
> > <Context>
> > <InstanceListener>org.example.yourInstanceListener</InstanceListener>
> > </Context>
> > 
> > A context InstanceListener are notify INIT, BEFORE, AFTER cycle...
> > 
> > Setup your InstanceListener class at common/classes.
> 
> Its getting worse n worse...now my even my jsp pages have gone to 
> sleep...thanks to this tomcat bug...the error that im getting is 
> Exception creating bean of class publicity.abc : 
> java.lang.ClassNotFoundException: 
> in my <html:form> attribute...why has this stopped working....has some jar 
file 
> got truncated.....
> 
> 
For some reasons in my java-build path i had duplicate servlet-api.jar and jsp-
api.jar in them. removing those did the trick. If you use eclipse then click on 
the project name--->properties---->java build path--->libraries tab....
I hope it helps someone :)....i have no idea on how duplicate copies came in 
there in the first place.
Comment 6 Suryaprakash 2008-11-22 06:50:14 UTC
For some reasons in my java-build path i had duplicate servlet-api.jar and jsp-
api.jar in them. removing those did the trick. If you use eclipse then click on 
the project name--->properties---->java build path--->libraries tab....
I hope it helps someone :)....i have no idea on how duplicate copies came in 
there in the first place.

Ans;-when we create the we project on eclipse that time eclipse provided the we related file.manly  in tomcat project.