tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Brown" <gm...@blueyonder.co.uk>
Subject RE: java.lang.NoClassDefFoundError: javax/servlet/Filter
Date Thu, 23 Jan 2003 17:59:29 GMT
John,

One (somewhat superstitious) thing:

I have the following as my 2.3 DTD:

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">

and this works for me.

In the past, I've found all sorts of wierd things happen as a result of
slightly off DTDs - might be worth trying this one, just in case...

D.

> >-----Original Message-----
> >From: Lorenti, John [mailto:JLORENTI@dcjs.state.va.us]
> >Sent: Thursday, January 23, 2003 7:51 AM
> >To: 'tomcat-user@jakarta.apache.org'
> >Subject: java.lang.NoClassDefFoundError: javax/servlet/Filter
> >
> >Hello,
> >
> >I'm trying to use Filters within Tomcat 4.1.12.  When I start Tomcat,
> >however, I get the following error message within the log the Filter
> >application pertains to:
> >
> >2003-01-22 16:11:36 StandardContext[/ws]: Exception starting filter
> >TestFilter
> >java.lang.NoClassDefFoundError: javax/servlet/Filter
> >	at java.lang.ClassLoader.defineClass0(Native Method)
> >	at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
> >	at
> >java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
> >	at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
> >	at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
> >	at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
> >	at java.security.AccessController.doPrivileged(Native Method)
> >	at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
> >	at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
> >	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
> >	at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
> >	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
> >	at java.lang.ClassLoader.defineClass0(Native Method)
> >	at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
> >	at
> >java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
> >	at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
> >	at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
> >	at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
> >	at java.security.AccessController.doPrivileged(Native Method)
> >	at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
> >	at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
> >	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
> >	at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
> >	at
> >org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoade
> r.ja
> >v
> >a:1340)
> >	at
> >org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoade
> r.ja
> >v
> >a:1274)
> >	at
> >org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationF
> ilte
> >r
> >Config.java:252)
> >	at
> >org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Applicati
> onFi
> >l
> >terConfig.java:314)
> >	at
> >org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilt
> erCo
> >n
> >fig.java:120)
> >	at
> >org.apache.catalina.core.StandardContext.filterStart(StandardContext.ja
> va:3
> >1
> >39)
> >	at
> >org.apache.catalina.core.StandardContext.start(StandardContext.java:352
> 8)
> >	at
> >org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
> >	at
> >org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
> >	at
> >org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
> >	at
> >org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
> >	at
> >org.apache.catalina.core.StandardService.start(StandardService.java:497
> )
> >	at
> >org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
> >	at
> >org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:
> 271)
> >	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >	at
> >sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
> va:3
> >9
> >)
> >	at
> >sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
> rImp
> >l
> >.java:25)
> >	at java.lang.reflect.Method.invoke(Method.java:324)
> >	at
> >org.apache.catalina.startup.BootstrapService.start(BootstrapService.jav
> a:24
> >5
> >)
> >	at
> >org.apache.catalina.startup.BootstrapService.main(BootstrapService.java
> :307
> >)
> >
> >
> >Here is the web.xml file:
> ><?xml version='1.0' encoding='ISO-8859-1'?>
> ><!DOCTYPE web-app PUBLIC
> >   "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> >   "http://java.sun.com/dtd/web-app_2_3.dtd"
> >   >
> >
> >   <web-app>
> >      <filter>
> >         <filter-name>TestFilter</filter-name>
> >
> <filter-class>us.va.state.dcjs.server.TestFilter</filter-class>
> >         </filter>
> >
> >      <filter-mapping>
> >         <filter-name>TestFilter</filter-name>
> >         <url-pattern>/ws/TRex.jsp</url-pattern>
> >         </filter-mapping>
> >
> >      <servlet>
> >         <servlet-name>Error</servlet-name>
> >         <servlet-class>us.va.state.dcjs.server.ErrorService</servlet-
> >class>
> >         </servlet>
> >
> >      <servlet-mapping>
> >         <servlet-name>Error</servlet-name>
> >         <url-pattern>/servlet/*</url-pattern>
> >         </servlet-mapping>
> >      </web-app>
> >
> >
> >The servlet.jar file is within <TOMCAT_HOME>/common/lib and contains
> this
> >class file.  All of the examples run.
> >
> >Is there something else I need to configure before filters will work
> for
> >me?
> >Any ideas would be greatly appreciated.
> >
> >Thank you.
> >-John Lorenti
> >
> >
> >
> >--
> >To unsubscribe, e-mail:   <mailto:tomcat-user-
> >unsubscribe@jakarta.apache.org>
> >For additional commands, e-mail: <mailto:tomcat-user-
> >help@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:tomcat-user-help@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:tomcat-user-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message