tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Rimov <rim...@centercomp.com>
Subject WEB-INF/lib Xerces2 vs. common/lib Xerces 1
Date Fri, 13 Sep 2002 20:16:05 GMT
Hey All,

I've got a weird class loading problem that I was wondering if somebody 
knew the best workaround:

We're shooting to deliver Xerces 2 with our webapp framework (Expresso)... 
but since Tomcat comes with Xerces 1 in the common/lib, I'm finding a weird 
conflict.  The directory layout is:

	-common/lib/xerces.jar
	-webapps/ROOT/WEB-INF/lib/xercesImpl.jar
	-webapps/ROOT/WEB-INF/lib/xmlapis.jar
	-webapps/ROOT/WEB-INf/lib/xalan.jar

The offending code is as follows:
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
dbf.setValidating(false);

DocumentBuilder db = dbf.newDocumentBuilder();
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

When the last line is called, I get a 'class not found' error, which is 
DOMErrorHandler (Xerces 2 specific).  So obviously, the above code is 
picking up a combination of Xerces 1 jar, and Xerces 2 jar.

So, since we don't want to have every installation out there deleting the 
xerces.jar that comes with Tomcat 4, does anybody have a suggested 
workaround so that we can make sure we're getting the Xerces 2 
DocumentBuilder??

Thanks in advance!!
						-Mike



--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message