tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: JAXM + Tomcat
Date Mon, 05 Nov 2001 20:01:56 GMT


On Mon, 5 Nov 2001, Tomasz Nowak wrote:

> Date: Mon, 05 Nov 2001 20:59:04 +0100
> From: Tomasz Nowak <tnowak@ipipan.waw.pl>
> Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> Subject: Re: JAXM + Tomcat
>
>
>
> Craig R. McClanahan wrote:
>
> >
> >>All JAXM classes I put into jdk1.3/jre/lib/ext
> >>
> >>
> >
> > This is the cause of your problem.  Put the JAXM JAR files in
> > "$CATALINA_HOME/lib" instead.
> >
>
> Yes, it works.
> Why ? What is a differnce ? Tomcat uses jdk...
>

The problem is the way class loaders work.  Details are in the docs
available at:

  http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html

but the important point is that one and only one servlet.jar file must be
in use to define classes like javax.servlet.http.HttpServlet.  When you
put the JAXM jar files in the system extensions directory, they get loaded
from a class loader "above" the one where servlet.jar lives, and thus
causes ClassCastException errors.  The same kind of thing will happen if
you put just a copy of servlet.jar in the extensions directory -- you will
get ClassCastException errors.

> Thank you.
>
> Best regards.
> --
> Tomasz Nowak
>

Craig


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message