At 03:02 PM 10/06/2003 +0100, you wrote:
Hi,

I'm trying to understand the tomcat class loading mechanism and have read
through the Class Loader HOW-TO (
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html
<http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html> ).


How does one make additional jars available to tomcat? I understand one can add them to WEB-INF/lib,but there are sometimes that approach does not work. Here's a scenario: I'm using tomcat 4.1.24 with jdk 1.4.1_02. One of the required libraries for my web app is oc4j.jar. If I put that oc4j.jar into the WEB-INF/lib, tomcat throws the following error on startup: ===== Starting service Tomcat-Standalone Apache Tomcat/4.1.24 WebappClassLoader: validateJarFile(D:\jakarta-tomcat-4.1.24\bin\..\webapps\graphics\WEB-INF\lib \oc4j.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class ===== Upon checking, I found oc4j.jar has javax.servlet.Servlet and I suspect it does not adhere to Servlet Spec 2.3 (but probably something earlier than that).


I would think javax.servlet.Servlet is being used by tomcat, why is it included in the jar file?
Try extracting the jar file, deleting all the unnecessary files (those that are already included in another base jar that tomcat uses), and recompile it into a new jar file. Replace the old oc4j.jar with the new one.



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to