Hi Malachi,

Thanks for your responses.
I've uncompressed the two jar files (xercesImpl.jar that I use before and
xerces.jar from JDOM).
But there are so many classes...
Which of them should I remplace from a version to another?

Regards,
Cyril.
_______________________________

Cyril Vidal
Email: [EMAIL PROTECTED]
Web: http://www.planetexml.com
----- Original Message -----
From: "Malachi de AElfweald" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, October 08, 2002 5:44 AM
Subject: Re: TOmcat 4.0.1 and JDOM b8


> "Incompatible object argument for function call"
>
> Sounds like the API changed and one of your servlets expected one
> format, and the other servlet expected another...  If you open the
> jars, you should be able to compare the two files....
>
> Malachi
>
> 10/7/2002 2:48:00 PM, "Cyril Vidal" <[EMAIL PROTECTED]> wrote:
>
> >Yes, in fact, I've put the xerces.jar given with JDOM  in
> >$JAVA_HOME/jre/lib/ext.
> >And I've no more the SAXNotRecognized Exception.
> >
> >But, it's very strange, I've got now the following error when I run
another
> >servlet that was running well before the manipulation.
> >Here is the beggining of my very basic code:
> >
> >// Imported TraX classes
> >import javax.xml.transform.TransformerFactory;
> >import javax.xml.transform.Transformer;
> >import javax.xml.transform.stream.StreamSource;
> >import javax.xml.transform.stream.StreamResult;
> >import javax.xml.transform.TransformerException;
> >import javax.xml.transform.TransformerConfigurationException;
> >
> >
> >// Imported java classes
> >import java.io.FileOutputStream;
> >import java.io.FileNotFoundException;
> >import java.io.IOException;
> >import org.apache.xerces.parsers.DOMParser;
> >import org.w3c.dom.Document;
> >import org.w3c.dom.NodeList;
> >import java.io.*;
> >import javax.servlet.*;
> >import javax.servlet.http.*;
> >
> >
> >public class TransformServlet extends HttpServlet {
> >
> > public  void doGet(HttpServletRequest request, HttpServletResponse
> >response)
> >         throws IOException, ServletException
> >  {
> >
> >        String thisProduct_id = request.getParameter("product_id");
> >
> >and here is the Exception generated by Tomcat:
> >root cause
> >
> >java.lang.VerifyError: (class: TransformServlet, method: doGet signature:
>
>(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResp
o
> >nse;)V) Incompatible object argument for function call
> > at java.lang.Class.newInstance0(Native Method)
> > at java.lang.Class.newInstance(Class.java:237)
> > at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:820)
> > at
>
>org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:615)
> > at
>
>org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.jav
a
> >:396)
> > at
>
>org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >
> >What do you think is still wrong?
> >Do I have to do something especially with TOmcat?
> >Thanks for your responses,
> >Cyril.
> >_______________________________
> >
> >Cyril Vidal
> >Email: [EMAIL PROTECTED]
> >Web: http://www.planetexml.com
> >----- Original Message -----
> >From: "Malachi de AElfweald" <[EMAIL PROTECTED]>
> >To: "Tomcat Users List" <[EMAIL PROTECTED]>; "Tomcat Users
> >List" <[EMAIL PROTECTED]>
> >Sent: Monday, October 07, 2002 10:28 PM
> >Subject: Re: TOmcat 4.0.1 and JDOM b8
> >
> >
> >> Also, make sure that an older version is not in $JAVA_HOME/jre/lib/ext
> >> cuz that would get used first
> >>
> >> Malachi
> >>
> >>
> >> 10/7/2002 1:14:36 PM, Padhu Vinirs <[EMAIL PROTECTED]> wrote:
> >>
> >> >JDOM is only a easy-to-use-wrapper for java programmers around
standard
> >> >xml parsers. The 'SAXNotRecognizedOption" is an object in xerces.jar.
> >> >make sure the xerces.jar that comes with JDOM beta 8 is in your web
> >> >app's classpath. Maybe JDOM beta 8 supports a version of xerces that
> >> >Tomcat is not supporting.
> >> >
> >> >-- padhu
> >> >
> >> >
> >> >
> >> >cyril vidal wrote:
> >> >
> >> >>Hi,
> >> >>
> >> >>I'm using Tomcat 4.0.1 and I have such a code snippet, using JDOM
beta
> >8:
> >> >>import java.io.*;
> >> >>import javax.servlet.*;
> >> >>import javax.servlet.http.*;
> >> >>import org.jdom.Element;
> >> >>import org.jdom.Document;
> >> >>import org.jdom.output.XMLOutputter;
> >> >>import org.jdom.input.SAXBuilder;
> >> >>import org.jdom.JDOMException;
> >> >>
> >> >>
> >> >>public class AddToOrder extends HttpServlet {
> >> >>
> >> >>public Document getDocument(File sourceFile, PrintWriter errorsOut) {
> >> >>try {
> >> >>  SAXBuilder builder = new SAXBuilder();
> >> >>            Document document = builder.build(sourceFile);
> >> >>  return document;
> >> >>
> >> >>    } catch (JDOMException e) {
> >> >>    errorsOut.print("Un problème s'est produit pendant la
construction
> >du
> >> >>document : "
> >> >>       +e.getMessage() + "<br/>"  + "Un document vide est
retourné.");
> >> >>       return new Document(new Element("blank"));
> >> >>...
> >> >>
> >> >>I receive systematically the following error message :
> >> >>
> >> >>root cause
> >> >>
> >> >>java.lang.NoClassDefFoundError: org/xml/sax/SAXNotRecognizedException
> >> >> at AddToOrder.getDocument(AddToOrder.java:15)
> >> >> at AddToOrder.doGet(AddToOrder.java:68)
> >> >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> >> >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >> >> at
> >>
>
>>>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicat
i
> >on
> >> >>FilterChain.java:247
> >> >>
> >> >>Waht's this class? I can't find it into xercesImpl.jar in the lib
> >directory
> >> >>of Tomcat, so why this method is called and by which component?
> >> >>
> >> >>Thanks a lot for your response,
> >> >>Best,
> >> >>Cyril.
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>--
> >> >>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]>
> >
> >
> >
>
>
>
>
> --
> 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