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...@planetexml.com> on 2002/10/07 20:02:21 UTC

Tomcat 4.0.1 and JDOM beta 8

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.





_______________________________

Cyril Vidal
Email: cyril@planetexml.com
Web: http://www.planetexml.com