Summary: Missing Class-Path entries are ignored, spec violation
Product: Tomcat 5
AssignedTo: [hidden email] ReportedBy: [hidden email]
I think this behavior violates the Servlet spec (see below). If I'm reading it
right, Class-Path entries in the MANIFEST.MF files for *both* WAR files and JAR
files in the WEB-INF/lib must cause the container to reject the application.
"Tomcat will now ignore a non existent classpath JAR (remm)"
From servlet-2_4-fr-spec.pdf, 9.7.1:
"The application developer depending on such an extension or extensions must
provide a META-INF/MANIFEST.MF entry in the WAR file listing all extensions
needed by theWAR. The format of the manifest entry should follow standard JAR
manifest format. During deployment of the Web application, the Web container
must make the correct versions of the extensions available to the application
following the rules defined by the Optional Package Versioning mechanism (http:/
"Web containers must also be able to recognize declared dependencies
expressed in the manifest entry of any of the library JARs under the WEB-INF/lib
entry in a WAR."
"If a Web container is not able to satisfy the dependencies declared in this
manner, it should reject the application with an informative error message."
I found the bug when Tomcat logged a ClassNotFoundException for a class that is
found in a jar listed in the Class-Path entry for my WAR's manifest. This jar
should have been placed in the TC_HOME\shared\lib directory, but was overlooked
and not copied there. It would be helpful if Tomcat rejected the WAR with an
informative error message so that the administrator quickly realized that the
environment was not configured properly.