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