[jdom-interest] RE: org.jdom.JDOMException: Could not load org.apache.xerces.pars ers.SAXParser

Pandia, Rajesh rajesh.pandia at matrixone.com
Wed Jun 23 10:09:17 PDT 2004


Can somebody please help on this ?

- I have verified that JDOM.jar, xerces.jar and xalan.jar are in the
classpath
- I have also verified that xerces.jar contains the
"org.apache.xerces.parsers.SAXParser" class

Thanks in Advance,

I am getting this exception JDOM exception, what is causing this ? This
worked fine in JDOM B7, but throws this in JDOM B9, Can you please help.  

Here's the code:
==============
   String DEFAULT_SAX_DRIVER_CLASS = "org.apache.xerces.parsers.SAXParser";
   org.jdom.input.SAXBuilder builder = new
SAXBuilder(DEFAULT_SAX_DRIVER_CLASS);
   System.out.println("2");
   
   Document doc = null;
   String result = "OK";

System.out.println("MsgDispatch: Dispatch was called");
   try
   {
	
    if (args.length <= 0)
    {
        // Build the JDOM Document from default file
        String filename="C:/XMLExchange/Sample/addrfq.xml";
        System.out.println("3");
        doc = builder.build(filename);
        System.out.println("4");
    }
}
.....

Here's the Exception:
=================
org.jdom.JDOMException: Could not load org.apache.xerces.parsers.SAXParser:
SAX2  driver class org.apache.xerces.parsers.SAXParser not found:
org.apache.xerces.p arsers.SAXParser
        at org.jdom.input.SAXBuilder.createParser(SAXBuilder.java:445)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:341)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:764)
        at
MsgDispatch_mxJPOMbYiTwAAAAEAAAAP.dispatch(MsgDispatch_mxJPOMbYiTwAAA
AEAAAAP.java:102)
        at java.lang.reflect.Method.invoke(Native Method)
        at
matrix.db.MatrixClassLoader.invokeObject(MatrixClassLoader.java:323)
        at
matrix.db.MatrixClassLoader.invokeObject(MatrixClassLoader.java:340)
        at com.matrixone.jni.MatrixKernel.statelessDispatch(Native Method)
        at
com.matrixone.jdl.rmi.bosInterfaceImpl.invokeClass(bosInterfaceImpl.j
ava:442)
        at
com.matrixone.jdl.bosInterfaceShim.invokeClass(bosInterfaceShim.java:
967)
        at matrix.db.JPO.invokePrivate(JPO.java:210)
        at matrix.db.JPO.invoke(JPO.java:156)
        at com.matrixone.servlet.ExecJPO.doJPO(MatrixMsgServlet.java:241)
        at com.matrixone.servlet.ExecJPO.run(MatrixMsgServlet.java:215)
        at java.lang.Thread.run(Thread.java:479)
Caused by: java.lang.ClassNotFoundException:
org.apache.xerces.parsers.SAXParser

        at
org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory
.java:118)
        at org.jdom.input.SAXBuilder.createParser(SAXBuilder.java:439)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:341)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:764)
        at
MsgDispatch_mxJPOMbYiTwAAAAEAAAAP.dispatch(MsgDispatch_mxJPOMbYiTwAAA
AEAAAAP.java:102)
        at java.lang.reflect.Method.invoke(Native Method)
        at
matrix.db.MatrixClassLoader.invokeObject(MatrixClassLoader.java:323)
        at
matrix.db.MatrixClassLoader.invokeObject(MatrixClassLoader.java:340)
        at com.matrixone.jni.MatrixKernel.statelessDispatch(Native Method)
        at
com.matrixone.jdl.rmi.bosInterfaceImpl.invokeClass(bosInterfaceImpl.j
ava:442)
        at
com.matrixone.jdl.bosInterfaceShim.invokeClass(bosInterfaceShim.java:
967)
        at matrix.db.JPO.invokePrivate(JPO.java:210)
        at matrix.db.JPO.invoke(JPO.java:156)
        at com.matrixone.servlet.ExecJPO.doJPO(MatrixMsgServlet.java:241)
        at com.matrixone.servlet.ExecJPO.run(MatrixMsgServlet.java:215)
        at java.lang.Thread.run(Thread.java:479)
Caused by: java.lang.ClassNotFoundException:
org.apache.xerces.parsers.SAXParser

        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:183)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:281)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:115)
        at
org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory
.java:116)
        at org.jdom.input.SAXBuilder.createParser(SAXBuilder.java:439)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:341)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:764)
        at
MsgDispatch_mxJPOMbYiTwAAAAEAAAAP.dispatch(MsgDispatch_mxJPOMbYiTwAAA
AEAAAAP.java:102)
        at java.lang.reflect.Method.invoke(Native Method)
        at
matrix.db.MatrixClassLoader.invokeObject(MatrixClassLoader.java:323)
        at
matrix.db.MatrixClassLoader.invokeObject(MatrixClassLoader.java:340)
        at com.matrixone.jni.MatrixKernel.statelessDispatch(Native Method)
        at
com.matrixone.jdl.rmi.bosInterfaceImpl.invokeClass(bosInterfaceImpl.j
ava:442)
        at
com.matrixone.jdl.bosInterfaceShim.invokeClass(bosInterfaceShim.java:
967)
        at matrix.db.JPO.invokePrivate(JPO.java:210)
        at matrix.db.JPO.invoke(JPO.java:156)
        at com.matrixone.servlet.ExecJPO.doJPO(MatrixMsgServlet.java:241)
        at com.matrixone.servlet.ExecJPO.run(MatrixMsgServlet.java:215)
        at java.lang.Thread.run(Thread.java:479)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20040623/44ceda52/attachment.htm


More information about the jdom-interest mailing list