tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Re: WEB-INF/lib Xerces2 vs. common/lib Xerces 1
Date Fri, 13 Sep 2002 20:25:16 GMT
Hello Michael,

If you use j2sdk1.4.x, the JDK will override the older xerces with its
own version.

Otherwise, upgrade to Tomcat-4.1.10 because it uses the latest Xerces
by default (in common/endorsed).

Jake

Friday, September 13, 2002, 3:16:05 PM, you wrote:

MR> Hey All,

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

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

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

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

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

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

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

MR> Thanks in advance!!
MR>                                                 -Mike



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



-- 
Best regards,
 Jacob                            mailto:hoju@visi.com


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