tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cyril Vidal" <cy...@planetexml.com>
Subject Re: TOmcat 4.0.1 and JDOM b8
Date Tue, 08 Oct 2002 18:16:07 GMT
hi Malachi,

thanks for all the time you spend for me...
I think the error comes anyway from the xerces.jar because when I remove the
xerces.jar from JDOM distribution from the JAVA_HOME\jre\lib\ext, I don't
have the exception...
But I still really don't understand why...

Regards,
 Cyril.
_______________________________

Cyril Vidal
Email: cyril@planetexml.com
Web: http://www.planetexml.com
----- Original Message -----
From: "Malachi de AElfweald" <malachi@tremerechantry.com>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Tuesday, October 08, 2002 6:25 PM
Subject: Re: TOmcat 4.0.1 and JDOM b8


> I apologize, but on closer inspection, I am not sure it will be in
xerces...
>
> The error says:
> org.apache.catalina.servlets.InvokerServlet.doGet
>
> and:
> java.lang.VerifyError: (class: TransformServlet, method: doGet signature:
>
(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletRespo
nse;)V)
> Incompatible object argument for function call
>
>
> now, running 'java JWhich org.apache.catalina.servlets.InvokerServlet'
(JWhich can be found
> at http://eoti.org/~malachi/java/jwhich.html), it says that class is
located in
> /usr/local/jakarta-tomcat4.1.12/server/lib/servlets-invoker.jar
>
>
> Now, I tried to find the class TransformServlet...  not an easy one to
find, since we don't
> know the package name... is it org.apache.xml, org.apache.xalan,
javax.xml, javax.servlet, etc...
> I haven't been able to find it on my system....
>
> My guess is that you have two copies of this file... but I am not sure
where...
>
> I wouldn't suggest replacing a FILE inside a jar... but figuring out which
jar is causing the conflict
> and seeing if you can (temporarily) remove that conflicting jar to get the
problem to go away...
>
>
> Malachi
>
>
> 10/8/2002 12:36:25 AM, "Cyril Vidal" <cyril@planetexml.com> wrote:
>
> >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: cyril@planetexml.com
> >Web: http://www.planetexml.com
> >----- Original Message -----
> >From: "Malachi de AElfweald" <malachi@tremerechantry.com>
> >To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
> >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" <cyril@planetexml.com> 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/HttpServletRes
p
> >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.ja
v
> >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: cyril@planetexml.com
> >> >Web: http://www.planetexml.com
> >> >----- Original Message -----
> >> >From: "Malachi de AElfweald" <malachi@tremerechantry.com>
> >> >To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>; "Tomcat
Users
> >> >List" <tomcat-user@jakarta.apache.org>
> >> >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 <p.padhu@verizon.net> 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(Applica
t
> >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:tomcat-user-unsubscribe@jakarta.apache.org>
> >> >> >>For additional commands, e-mail:
> >> ><mailto:tomcat-user-help@jakarta.apache.org>
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> >> >
> >> >> >--
> >> >> >To unsubscribe, e-mail:
> >> ><mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> >> >> >For additional commands, e-mail:
> >> ><mailto:tomcat-user-help@jakarta.apache.org>
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> To unsubscribe, e-mail:
> >> ><mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> >> >> For additional commands, e-mail:
> >> ><mailto:tomcat-user-help@jakarta.apache.org>
> >> >>
> >> >>
> >> >
> >> >
> >> >
> >> >--
> >> >To unsubscribe, e-mail:
> ><mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> >> >For additional commands, e-mail:
> ><mailto:tomcat-user-help@jakarta.apache.org>
> >> >
> >> >
> >> >
> >>
> >>
> >>
> >>
> >> --
> >> To unsubscribe, e-mail:
> ><mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> >> For additional commands, e-mail:
> ><mailto:tomcat-user-help@jakarta.apache.org>
> >>
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> >For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>
> >
> >
> >
>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>
>
>



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