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$NSContentDispatcher is subclass
of final class org/apache/xerces/impl/XMLDocumentScannerImpl$ContentDispatcher
    at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.createContentDispatcher(Unknown
Source)
    at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.(XMLDocumentFragmentScannerImpl.java:248)
    at
org.apache.xerces.impl.XMLDocumentScannerImpl.(XMLDocumentScannerImpl.java:245)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.(Unknown Source)
    at
org.apache.xerces.parsers.IntegratedParserConfiguration.createDocumentScanner(Unknown
Source)
    at org.apache.xerces.parsers.DTDConfiguration.(DTDConfiguration.java:366)
    at
org.apache.xerces.parsers.StandardParserConfiguration.(StandardParserConfiguration.java:197)
    at org.apache.xerces.parsers.IntegratedParserConfiguration.(Unknown Source)
    at org.apache.xerces.parsers.IntegratedParserConfiguration.(Unknown 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(ObjectFactory.java:224)
    at org.apache.xerces.util.ObjectFactory.createObject(ObjectFactory.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.(DocumentBuilderImpl.java:102)
    at
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(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]>

Reply via email to