Class Not Found Issues

Preface

This page discusses the various ways you see Class Not Found errors or very similar errors. It is strongly advised you read the following topics:

If you get a NoClassDefFoundError exception, the root cause might be the same as for a ClassNotFound exception.

Questions

  1. Why is jsp:useBean is not working?

  2. Why do I get java.lang.NoClassDefFoundError: javax/servlet/Filter?

  3. Why do I get java.lang.NoClassDefFoundError: org/xml/sax/InputSource?

Answers

Why is  jsp:useBean  is not working?

Make sure:

Why do I get  java.lang.NoClassDefFoundError: javax/servlet/Filter?

You probably have servlet.jar floating around somewhere it shouldn't be. This really messes up the classloaders since Tomcat's classloaders don't act quite as normal as one expects (see links above). servlet.jar should only be found only once in $CATALINA_HOME/common/lib.

Why do I get  java.lang.NoClassDefFoundError: org/xml/sax/InputSource ?

FAQ/Class_Not_Found (last edited 2009-12-03 21:22:43 by MarkPiper)