tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lorenti, John" <JLORE...@dcjs.state.va.us>
Subject java.lang.NoClassDefFoundError: javax/servlet/Filter
Date Thu, 23 Jan 2003 12:51:02 GMT
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(WebappClassLoader.jav
a:1340)
	at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1274)
	at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilter
Config.java:252)
	at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFil
terConfig.java:314)
	at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterCon
fig.java:120)
	at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:31
39)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3528)
	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.java:39
)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at
org.apache.catalina.startup.BootstrapService.start(BootstrapService.java:245
)
	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>


Mime
View raw message