tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Spath <msp...@arcor.de>
Subject Re: That old tomcat 4.0.2 - xerces.jar file problem one more time...please
Date Wed, 27 Feb 2002 10:41:25 GMT
additional question:

relies tomcat itself on the libs in CATALINA_HOME/common/lib ?

if not, it could be a good idea to just remove all xml-related libraries from 
there and (redundantly) including them in WEB-INF/lib of the projects to gain 
some sort of control.
- just a thought and i didn't have a closer look at the class-loading mechanism.

are there any best practices for that one might follow?


Markus


Drew Cox wrote:


> Our webapp includes xerces.jar in the web.inf/lib directory.  This works
> fine on Tomcat 3.1 (our prod version) and 3.3a (our new prod version if I
> can't get this sorted).
> 
> On 4.0.2 I get the following error in the tomcat logs, apparently when
> trying to compile a JSP:
> 
> ----- Root Cause -----
> java.lang.NoClassDefFoundError: org/w3c/dom/range/Range
> 	at java.lang.Class.forName0(Native Method)
> 	at java.lang.Class.forName(Class.java:120)
> 	at
> org.apache.xerces.parsers.DOMParser.setDocumentClassName(DOMParser.java:489)
> 	at org.apache.xerces.parsers.DOMParser.<init>(DOMParser.java:221)
> 	at
> org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(DocumentBuilderImpl.java:9
> 8)
> 	at
> org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Documen
> tBuilderFactoryImpl.java:87)
> 	at
> org.apache.jasper.parser.ParserUtils.parseXMLDocument(ParserUtils.java:197)
> 	at
> org.apache.jasper.compiler.TldLocationsCache.processWebDotXml(TldLocationsCa
> che.java:165)
> 	at
> org.apache.jasper.compiler.TldLocationsCache.<init>(TldLocationsCache.java:1
> 38)
> 	at
> org.apache.jasper.EmbededServletOptions.<init>(EmbededServletOptions.java:34
> 5)
> 	at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:266)
> 	at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91
> 6)
> 	at
> org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:653)
> 
>>>From reading the previous posts and tomcat docs, it appears there are some
> classloader/version conflicts with the xerces.jar in the
> CATALINA_HOME/common/lib directory.  I have tried moving the catalina
> xerces.jar around into all of the other libs in tomcat to no avail.
> 
> If I remove our webapp's xerces.jar, things work fine.  This is a reasonable
> workaround, but what if I really needed different versions of the library
> available to different apps?  I'm sure there is a simple way to make this
> work, please help the terminally bewildered to get this working.



--
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