Bug 8622

Summary: Classloader fails to load certain classes from WEB-INF/lib directory
Product: Tomcat 4 Reporter: Sascha Weinreuter <sascha.weinreuter>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED DUPLICATE    
Severity: major    
Priority: P3    
Version: 4.0.3 Final   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Attachments: the webapp's index.jsp file
error stacktrace

Description Sascha Weinreuter 2002-04-29 14:45:16 UTC
Tomcat fails to load a JSP page or servlet which refers to classes from xml-
apis.jar located in the WEB-INF/lib directory of the webapp.

Error message:
javax.servlet.ServletException: javax/xml/transform/URIResolver
...
root cause 

java.lang.NoClassDefFoundError: javax/xml/transform/URIResolver
...

(see full stack trace in attachment)

This is the contents of a sample webapp that produces the problem:
webapps\
  test\
    index.jsp         (see attachment)
    WEB-INF\
      lib\
        xalan.jar     (version 2.2.D13)
        xerces.jar    (version 1.4.4)
        xml-apis.jar  (from xalan dist)

Running such an webapp in Tomcat 3.3 does not cause any problems.

Although putting xalan.jar and xml-apis.jar into the common/lib directory 
solves the problem, this is very inconvenient because the webapp(.war) should 
be self-contained.
Comment 1 Sascha Weinreuter 2002-04-29 14:46:20 UTC
Created attachment 1731 [details]
the webapp's index.jsp file
Comment 2 Sascha Weinreuter 2002-04-29 14:46:40 UTC
Created attachment 1732 [details]
error stacktrace
Comment 3 Remy Maucherat 2002-04-29 15:14:32 UTC

*** This bug has been marked as a duplicate of 6374 ***