Class loader problem with Xalan under 4.0.2 and 4.0.3

Hi, I have:

  jakarta-tomcat-4.0.2 / jakarta-tomcat-4.0.3
  Xerces-J-bin.2.0.2 
  xalan-j_2_4_D1-bin.tar.gz
  jdom
  sun jdk jdk1.3.1

on a linux box.

According to Tomcat documentation, class loading is
done in the following order:

  /WEB-INF/classes of your web application 
  /WEB-INF/lib/*.jar of your web application 
  Bootstrap classes of your JVM 
  System class loader classses
  $CATALINA_HOME/common/classes 
  $CATALINA_HOME/common/lib/*.jar 
  $CATALINA_HOME/classes 
  $CATALINA_HOME/lib/*.jar 

In my /WEB-INF/lib/ directory, I have all the
xerces, xalan and jdom jar files:

  BCEL.jar
  JLex.jar
  bsf.jar
  java_cup.jar
  jdom.jar
  regexp.jar
  runtime.jar
  xalan.jar
  xalansamples.jar
  xalanservlet.jar
  xercesImpl.jar
  xercesSamples.jar
  xml-apis.jar
  xmlParserAPIs.jar
  xsltc.jar

When I run my servlet from /WEB-INF/classes,
I get this:

  root cause 

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

This means Tomcat can't find the xalan lib.
*** Tomcat can find xerces and jdom libs ***

At this point, I decided to do some testing on other versions
of Tomcat and here are the results.


  Tomcat        xalan lib in /WEB-INF/lib/
  ------        --------------------------
  3.3.1         OK
  4.0.2         NOT OK
  4.0.3         NOT OK
  4.0.4         OK


The only way to make 4.0.2 and 4.0.3 aware of xalan libs is to
have the xalan jar files in "Bootstrap classes of my JVM" which
is in /usr/local/jdk1.3.1_02/jre/lib/ext. But having the libs
in this directory can effect other applications within the same
container. How do I make my Tomcat 4.0.2 and 4.0.3 use the xalan
lib in my /WEB-INF/lib/ directory? Is this a Tomcat config problem
or a Xalan config problem?

Thanks
Stephen




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

Reply via email to