tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Jamison <rjami...@lincom-asg.com>
Subject Re: Q for tc4: now its running
Date Fri, 13 Oct 2000 15:07:07 GMT


Bob Jamison wrote:

> Never mind.  It's in /bin.  Need sleep!
>
> Bob

In a 'pristine' /dist copy, not modified, running
any 'example' servlet  produces a ClassCastEx when setting
a new filter via newInstance():

java.lang.ClassCastException: filters.ExampleFilter
        at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:339,
Compiled Code)
        at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:117,
Compiled Code)

...etc....



Here is the offending code:

     if (filterClass.startsWith("org.apache.catalina."))
  classLoader = this.getClass().getClassLoader();
     else
  classLoader = context.getLoader().getClassLoader();

     // Instantiate a new instance of this filter
     Class clazz = classLoader.loadClass(filterClass);
     this.filter = (Filter) clazz.newInstance();    <--line 339
     filter.setFilterConfig(this);

I'm trying to run this thing via a debugger, so I can see what
filterClass can be....


Bob




Mime
View raw message