Does this happen with Tomcat 4.0.1 too ?

Acc. to the Tomcat docs at
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html, the
following order is maintained when loading classes.

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

Sriram

--- Michael Kastner <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> as I saw in many mailing lists I am not the only one who had the following
> problem, so I post a solution here.
> 
> Problem:
> After installing tomcat 4.01 all example JSPs in the provided applications
> work well. But when you try to run your own JSPs in your own applications
> you suddenly get this exception thrown:
> 
> exception
> javax.servlet.ServletException: Servlet.init() for servlet jsp threw
> exception
> ...
> ...
> root cause
> java.lang.ClassCastException:
> org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
> 
> 
> Solution (at least in my case):
> 
> I had an xml parser version in my /appname/WEB-INF/lib directory which was
> different from the xml parser located in {TOMCAT-ROOT}/common/lib. It seems
> that if there is an xml parser located in the app's WEB-INF/lib directory,
> then this parser is being used to compile the application's JSPs. And this
> leads eventually to the ClassCastException.
> 
> The application, where this error occured was originally transferred from
> JRUN 3.1 where this behaviour does not occur. On a JRUN 3.1 server the xml
> parser in an application's WEB-INF/lib directory is NOT being used to
> compile the application's JSPs. However in tomcat 4.01 it is being USED. So
> watch out about multiple xml-parser versions!
> 
> Maybe this helps some people.
> 
> Sincerely
> 
> Michael Kastner
> 
> 
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
> 


__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to