you are correct. Java 1.4 does not allow you to override classes already
loaded by a parent classloader. Tomcat enforces this. You can replace the
version that comes with tomcat if you need a newer version.

Charlie

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 26, 2002 12:22 PM
> To: [EMAIL PROTECTED]
> Subject: Re: verifyError with tomcat and xerces 2.2.1
> 
> 
> Yes I tried. I'm using tomcat 4.1.12. Actually if I replace 
> the xercesImpl.jar
> but the latest version in the common/endorsed directory that 
> work fine (this is
> normal). So I suppose that is not possible to use two 
> differents version of
> xerces, one used by the server and the other one used by a 
> webapp. I'm wrong? 
> Actually, this is really weird since in the log file, tomcat 
> load the good
> xerces jar:
> 
> ....
> 2002-11-25 10:45:12 WebappLoader[/axis]: Deploy JAR 
> /WEB-INF/lib/xercesImpl.jar
> to 
> C:\java\jakarta-tomcat-4.1.12\webapps\axis\WEB-INF\lib\xercesImpl.jar
> ....
> 
> It must not override the classes already loaded from the endorsed dir.
> 
> 
> 
> Jeanfrancois Arcand wrote:
> Have you try with the SUN JDK 1.3.1? Which version of Tomcat 
> are you using?
> 
> -- Jeanfrancois
> 
> [EMAIL PROTECTED] wrote:
> 
> Hi,
> I created a very small servlet and when I try to run it I got 
> a VerifyError
> exception (see below). The servlet try to create a instance of JAXP
> DocumentBuilder. I use xerces 2.2.1, that work with previous 
> versions. That work
> also on the client side (xerces 2.2.1 and without tomcat). 
> The JDK used is IBM
> jdk1.3.1. Any ideas of what wrong? Thanks
> 
> Execption trace:
> 
> java.lang.VerifyError: Class
> org/apache/xerces/impl/XMLNSDocumentScannerImpl$NSContentDispa
> tcher is subclass
> of final class 
> org/apache/xerces/impl/XMLDocumentScannerImpl$ContentDispatcher
>     at
> org.apache.xerces.impl.XMLNSDocumentScannerImpl.createContentD
> ispatcher(Unknown
> Source)
>     at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.(XMLDocu
mentFragmentScannerImpl.java:248)
>     at
> org.apache.xerces.impl.XMLDocumentScannerImpl.(XMLDocumentScan
nerImpl.java:245)
>     at 
> org.apache.xerces.impl.XMLNSDocumentScannerImpl.(Unknown Source)
>     at
> org.apache.xerces.parsers.IntegratedParserConfiguration.create
> DocumentScanner(Unknown
> Source)
>     at 
> org.apache.xerces.parsers.DTDConfiguration.(DTDConfiguration.java:366)
>     at
> org.apache.xerces.parsers.StandardParserConfiguration.(Standar
dParserConfiguration.java:197)
>     at 
> org.apache.xerces.parsers.IntegratedParserConfiguration.(Unkno
> wn Source)
>     at 
> org.apache.xerces.parsers.IntegratedParserConfiguration.(Unkno
> wn Source)
>     at java.lang.Class.newInstance0(Native Method)
>     at java.lang.Class.newInstance(Class.java:262)
>     at 
> org.apache.xerces.util.ObjectFactory.newInstance(ObjectFactory
> .java:293)
>     at 
> org.apache.xerces.util.ObjectFactory.createObject(ObjectFactor
> y.java:224)
>     at 
> org.apache.xerces.util.ObjectFactory.createObject(ObjectFactor
> y.java:119)
>     at org.apache.xerces.parsers.DOMParser.(DOMParser.java:153)
>     at org.apache.xerces.parsers.DOMParser.(DOMParser.java:137)
>     at 
> org.apache.xerces.jaxp.DocumentBuilderImpl.(DocumentBuilderImp
> l.java:102)
>     at
> org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentB
> uilder(DocumentBuilderFactoryImpl.java:88)
> 
> 
> The servlet code is:
> 
> import java.io.IOException;
> import javax.servlet.ServletException;
> import javax.servlet.http.HttpServlet;
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpServletResponse;
> import javax.xml.parsers.DocumentBuilder;
> import javax.xml.parsers.DocumentBuilderFactory;
> import javax.xml.parsers.ParserConfigurationException;
> 
> import org.w3c.dom.Document;
> 
> /**
> *
> */
> public class Test2 extends HttpServlet {
> 
>     
>     /**
>      * @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest,
> HttpServletResponse)
>      */
>     protected void doGet(HttpServletRequest arg0, 
> HttpServletResponse arg1) throws
> ServletException, IOException {
>         DocumentBuilderFactory docFactory = 
> DocumentBuilderFactory.newInstance();
>        docFactory.setNamespaceAware(true);
>        try {
> 
>            DocumentBuilder docBuilder = 
> docFactory.newDocumentBuilder();
>                       Document _document = docBuilder.newDocument();
>        } catch (ParserConfigurationException e) {
>        }
>     }
> 
> }
> 
> 
> -- 
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


 



-- 
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to