You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by cyril vidal <cy...@wanadoo.fr> on 2002/10/07 19:49:15 UTC

TOmcat 4.0.1 and JDOM b8

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(Application
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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Admin...

Posted by Roland S Nygren <Ro...@telia.se>.
I added the following lines to tomcat-user.xml
and then  Admin worked fine!

   <role rolename="manager"/>
   <role rolename="admin"/>
   <user username="admin" password="admin" roles="standard,manager,admin"/>

/Roland Nygren

 > I did that...and I was able to execute the manager commands...but from the
 > default main-page of the there's an Administration Tool and I tried the
 > username and password and it didn't work...still told me access denied...
 >
 > -Dubbs
 >
 > ----- Original Message -----
 > From: "Jeff Macomber" <JMacomberX0040;NetByTel.com>
 > To: "'Tomcat Users List'" <tomcat-userX0040;jakarta.apache.org>
 > Sent: Friday, June 07, 2002 4:58 PM
 > Subject: RE: Admin...
 >
 >
 > > Dubbs,
 > >
 > > There is no default user that has access to the manager app.  You can
add
 > > one in the tomcat-user.xml by entering a username and password then
 > setting
 > > the role to be manager.
 > >
 > > Hope this helps,
 > > Jeff
 > >
 > > -----Original Message-----
 > > From: Dubbs [mailto:dubbsX0040;cfl.rr.com]
 > > Sent: Friday, June 07, 2002 4:54 PM
 > > To: Tomcat-User Mailing List
 > > Subject: Admin...
 > >
 > >
 > > Hey guys...dumb question but I can't find the answer in any of the
 > docs....
 > >
 > > I have a default Tomcat install and am trying to get into the Admin
 > > Tool...what is the default name and password and is that stored in
 > > ./conf/tomcat-user.xml ?
 > >
 > > Thanks
 > > -Dubbs
 > >
 > >
 > > --
 > > To unsubscribe, e-mail:
 > <mailto:tomcat-user-unsubscribeX0040;jakarta.apache.org>
 > > For additional commands, e-mail:
 > <mailto:tomcat-user-helpX0040;jakarta.apache.org>
 > >
 >
 >
 >
 > --
 > To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribeX0040;jakarta.apache.org>
 > For additional commands, e-mail:
<mailto:tomcat-user-helpX0040;jakarta.apache.org>
 >
 >


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: TOmcat 4.0.1 and JDOM b8

Posted by Malachi de AElfweald <ma...@tremerechantry.com>.
perhaps there is another version of that class
in one of the WEB-INF directories?

Malachi


10/8/2002 11:16:07 AM, "Cyril Vidal" <cy...@planetexml.com> wrote:

>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" <ma...@tremerechantry.com>
>To: "Tomcat Users List" <to...@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" <cy...@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" <ma...@tremerechantry.com>
>> >To: "Tomcat Users List" <to...@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" <cy...@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" <ma...@tremerechantry.com>
>> >> >To: "Tomcat Users List" <to...@jakarta.apache.org>; "Tomcat
>Users
>> >> >List" <to...@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....@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:
>> >> ><ma...@jakarta.apache.org>
>> >> >> >>For additional commands, e-mail:
>> >> ><ma...@jakarta.apache.org>
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >--
>> >> >> >To unsubscribe, e-mail:
>> >> ><ma...@jakarta.apache.org>
>> >> >> >For additional commands, e-mail:
>> >> ><ma...@jakarta.apache.org>
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> To unsubscribe, e-mail:
>> >> ><ma...@jakarta.apache.org>
>> >> >> For additional commands, e-mail:
>> >> ><ma...@jakarta.apache.org>
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> >--
>> >> >To unsubscribe, e-mail:
>> ><ma...@jakarta.apache.org>
>> >> >For additional commands, e-mail:
>> ><ma...@jakarta.apache.org>
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> To unsubscribe, e-mail:
>> ><ma...@jakarta.apache.org>
>> >> For additional commands, e-mail:
>> ><ma...@jakarta.apache.org>
>> >>
>> >
>> >
>> >
>> >--
>> >To unsubscribe, e-mail:
><ma...@jakarta.apache.org>
>> >For additional commands, e-mail:
><ma...@jakarta.apache.org>
>> >
>> >
>> >
>>
>>
>>
>>
>> --
>> To unsubscribe, e-mail:
><ma...@jakarta.apache.org>
>> For additional commands, e-mail:
><ma...@jakarta.apache.org>
>>
>>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: TOmcat 4.0.1 and JDOM b8

Posted by Cyril Vidal <cy...@planetexml.com>.
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" <ma...@tremerechantry.com>
To: "Tomcat Users List" <to...@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" <cy...@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" <ma...@tremerechantry.com>
> >To: "Tomcat Users List" <to...@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" <cy...@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" <ma...@tremerechantry.com>
> >> >To: "Tomcat Users List" <to...@jakarta.apache.org>; "Tomcat
Users
> >> >List" <to...@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....@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:
> >> ><ma...@jakarta.apache.org>
> >> >> >>For additional commands, e-mail:
> >> ><ma...@jakarta.apache.org>
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> >> >
> >> >> >--
> >> >> >To unsubscribe, e-mail:
> >> ><ma...@jakarta.apache.org>
> >> >> >For additional commands, e-mail:
> >> ><ma...@jakarta.apache.org>
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> To unsubscribe, e-mail:
> >> ><ma...@jakarta.apache.org>
> >> >> For additional commands, e-mail:
> >> ><ma...@jakarta.apache.org>
> >> >>
> >> >>
> >> >
> >> >
> >> >
> >> >--
> >> >To unsubscribe, e-mail:
> ><ma...@jakarta.apache.org>
> >> >For additional commands, e-mail:
> ><ma...@jakarta.apache.org>
> >> >
> >> >
> >> >
> >>
> >>
> >>
> >>
> >> --
> >> To unsubscribe, e-mail:
> ><ma...@jakarta.apache.org>
> >> For additional commands, e-mail:
> ><ma...@jakarta.apache.org>
> >>
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> >For additional commands, e-mail:
<ma...@jakarta.apache.org>
> >
> >
> >
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: TOmcat 4.0.1 and JDOM b8

Posted by Malachi de AElfweald <ma...@tremerechantry.com>.
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/HttpServletResponse;)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" <cy...@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" <ma...@tremerechantry.com>
>To: "Tomcat Users List" <to...@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" <cy...@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/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: cyril@planetexml.com
>> >Web: http://www.planetexml.com
>> >----- Original Message -----
>> >From: "Malachi de AElfweald" <ma...@tremerechantry.com>
>> >To: "Tomcat Users List" <to...@jakarta.apache.org>; "Tomcat Users
>> >List" <to...@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....@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(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:
>> ><ma...@jakarta.apache.org>
>> >> >>For additional commands, e-mail:
>> ><ma...@jakarta.apache.org>
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> >--
>> >> >To unsubscribe, e-mail:
>> ><ma...@jakarta.apache.org>
>> >> >For additional commands, e-mail:
>> ><ma...@jakarta.apache.org>
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> To unsubscribe, e-mail:
>> ><ma...@jakarta.apache.org>
>> >> For additional commands, e-mail:
>> ><ma...@jakarta.apache.org>
>> >>
>> >>
>> >
>> >
>> >
>> >--
>> >To unsubscribe, e-mail:
><ma...@jakarta.apache.org>
>> >For additional commands, e-mail:
><ma...@jakarta.apache.org>
>> >
>> >
>> >
>>
>>
>>
>>
>> --
>> To unsubscribe, e-mail:
><ma...@jakarta.apache.org>
>> For additional commands, e-mail:
><ma...@jakarta.apache.org>
>>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: TOmcat 4.0.1 and JDOM b8

Posted by Cyril Vidal <cy...@planetexml.com>.
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" <ma...@tremerechantry.com>
To: "Tomcat Users List" <to...@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" <cy...@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/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: cyril@planetexml.com
> >Web: http://www.planetexml.com
> >----- Original Message -----
> >From: "Malachi de AElfweald" <ma...@tremerechantry.com>
> >To: "Tomcat Users List" <to...@jakarta.apache.org>; "Tomcat Users
> >List" <to...@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....@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(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:
> ><ma...@jakarta.apache.org>
> >> >>For additional commands, e-mail:
> ><ma...@jakarta.apache.org>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >
> >> >
> >> >
> >> >--
> >> >To unsubscribe, e-mail:
> ><ma...@jakarta.apache.org>
> >> >For additional commands, e-mail:
> ><ma...@jakarta.apache.org>
> >> >
> >> >
> >> >
> >>
> >>
> >>
> >>
> >> --
> >> To unsubscribe, e-mail:
> ><ma...@jakarta.apache.org>
> >> For additional commands, e-mail:
> ><ma...@jakarta.apache.org>
> >>
> >>
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> >For additional commands, e-mail:
<ma...@jakarta.apache.org>
> >
> >
> >
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: TOmcat 4.0.1 and JDOM b8

Posted by Malachi de AElfweald <ma...@tremerechantry.com>.
"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" <cy...@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/HttpServletRespo
>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.java
>: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" <ma...@tremerechantry.com>
>To: "Tomcat Users List" <to...@jakarta.apache.org>; "Tomcat Users
>List" <to...@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....@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(Applicati
>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:
><ma...@jakarta.apache.org>
>> >>For additional commands, e-mail:
><ma...@jakarta.apache.org>
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>> >
>> >--
>> >To unsubscribe, e-mail:
><ma...@jakarta.apache.org>
>> >For additional commands, e-mail:
><ma...@jakarta.apache.org>
>> >
>> >
>> >
>>
>>
>>
>>
>> --
>> To unsubscribe, e-mail:
><ma...@jakarta.apache.org>
>> For additional commands, e-mail:
><ma...@jakarta.apache.org>
>>
>>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: TOmcat 4.0.1 and JDOM b8

Posted by Cyril Vidal <cy...@planetexml.com>.
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/HttpServletRespo
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.java
: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" <ma...@tremerechantry.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>; "Tomcat Users
List" <to...@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....@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(Applicati
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:
<ma...@jakarta.apache.org>
> >>For additional commands, e-mail:
<ma...@jakarta.apache.org>
> >>
> >>
> >>
> >>
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> >For additional commands, e-mail:
<ma...@jakarta.apache.org>
> >
> >
> >
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: TOmcat 4.0.1 and JDOM b8

Posted by Malachi de AElfweald <ma...@tremerechantry.com>.
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....@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(Application
>>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:   <ma...@jakarta.apache.org>
>>For additional commands, e-mail: <ma...@jakarta.apache.org>
>>
>>
>>  
>>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: TOmcat 4.0.1 and JDOM b8

Posted by Padhu Vinirs <p....@verizon.net>.
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(Application
>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:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>  
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>