<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: org.jdom.JDOMException: Could not load org.apache.xerces.parsers.SAXParser</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>Can somebody please help on this ?</FONT>
</P>
<P><FONT SIZE=2>- I have verified that JDOM.jar, xerces.jar and xalan.jar are in the classpath</FONT>
<BR><FONT SIZE=2>- I have also verified that xerces.jar contains the "org.apache.xerces.parsers.SAXParser" class</FONT>
</P>
<P><FONT SIZE=2>Thanks in Advance,</FONT>
</P>
<P><FONT SIZE=2>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. </FONT></P>
<P><FONT SIZE=2>Here's the code:</FONT>
<BR><FONT SIZE=2>==============</FONT>
<BR><FONT SIZE=2> String DEFAULT_SAX_DRIVER_CLASS = "org.apache.xerces.parsers.SAXParser";</FONT>
<BR><FONT SIZE=2> org.jdom.input.SAXBuilder builder = new SAXBuilder(DEFAULT_SAX_DRIVER_CLASS);</FONT>
<BR><FONT SIZE=2> System.out.println("2");</FONT>
<BR><FONT SIZE=2> </FONT>
<BR><FONT SIZE=2> Document doc = null;</FONT>
<BR><FONT SIZE=2> String result = "OK";</FONT>
</P>
<P><FONT SIZE=2>System.out.println("MsgDispatch: Dispatch was called");</FONT>
<BR><FONT SIZE=2> try</FONT>
<BR><FONT SIZE=2> {</FONT>
<BR>
<BR><FONT SIZE=2> if (args.length <= 0)</FONT>
<BR><FONT SIZE=2> {</FONT>
<BR><FONT SIZE=2> // Build the JDOM Document from default file</FONT>
<BR><FONT SIZE=2> String filename="C:/XMLExchange/Sample/addrfq.xml";</FONT>
<BR><FONT SIZE=2> System.out.println("3");</FONT>
<BR><FONT SIZE=2> doc = builder.build(filename);</FONT>
<BR><FONT SIZE=2> System.out.println("4");</FONT>
<BR><FONT SIZE=2> }</FONT>
<BR><FONT SIZE=2>}</FONT>
<BR><FONT SIZE=2>.....</FONT>
</P>
<P><FONT SIZE=2>Here's the Exception:</FONT>
<BR><FONT SIZE=2>=================</FONT>
<BR><FONT SIZE=2>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</FONT></P>
<P><FONT SIZE=2> at org.jdom.input.SAXBuilder.createParser(SAXBuilder.java:445)</FONT>
<BR><FONT SIZE=2> at org.jdom.input.SAXBuilder.build(SAXBuilder.java:341)</FONT>
<BR><FONT SIZE=2> at org.jdom.input.SAXBuilder.build(SAXBuilder.java:764)</FONT>
<BR><FONT SIZE=2> at MsgDispatch_mxJPOMbYiTwAAAAEAAAAP.dispatch(MsgDispatch_mxJPOMbYiTwAAA</FONT>
<BR><FONT SIZE=2>AEAAAAP.java:102)</FONT>
<BR><FONT SIZE=2> at java.lang.reflect.Method.invoke(Native Method)</FONT>
<BR><FONT SIZE=2> at matrix.db.MatrixClassLoader.invokeObject(MatrixClassLoader.java:323)</FONT>
<BR><FONT SIZE=2> at matrix.db.MatrixClassLoader.invokeObject(MatrixClassLoader.java:340)</FONT>
<BR><FONT SIZE=2> at com.matrixone.jni.MatrixKernel.statelessDispatch(Native Method)</FONT>
<BR><FONT SIZE=2> at com.matrixone.jdl.rmi.bosInterfaceImpl.invokeClass(bosInterfaceImpl.j</FONT>
<BR><FONT SIZE=2>ava:442)</FONT>
<BR><FONT SIZE=2> at com.matrixone.jdl.bosInterfaceShim.invokeClass(bosInterfaceShim.java:</FONT>
<BR><FONT SIZE=2>967)</FONT>
<BR><FONT SIZE=2> at matrix.db.JPO.invokePrivate(JPO.java:210)</FONT>
<BR><FONT SIZE=2> at matrix.db.JPO.invoke(JPO.java:156)</FONT>
<BR><FONT SIZE=2> at com.matrixone.servlet.ExecJPO.doJPO(MatrixMsgServlet.java:241)</FONT>
<BR><FONT SIZE=2> at com.matrixone.servlet.ExecJPO.run(MatrixMsgServlet.java:215)</FONT>
<BR><FONT SIZE=2> at java.lang.Thread.run(Thread.java:479)</FONT>
<BR><FONT SIZE=2>Caused by: java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser</FONT>
</P>
<P><FONT SIZE=2> at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory</FONT>
<BR><FONT SIZE=2>.java:118)</FONT>
<BR><FONT SIZE=2> at org.jdom.input.SAXBuilder.createParser(SAXBuilder.java:439)</FONT>
<BR><FONT SIZE=2> at org.jdom.input.SAXBuilder.build(SAXBuilder.java:341)</FONT>
<BR><FONT SIZE=2> at org.jdom.input.SAXBuilder.build(SAXBuilder.java:764)</FONT>
<BR><FONT SIZE=2> at MsgDispatch_mxJPOMbYiTwAAAAEAAAAP.dispatch(MsgDispatch_mxJPOMbYiTwAAA</FONT>
<BR><FONT SIZE=2>AEAAAAP.java:102)</FONT>
<BR><FONT SIZE=2> at java.lang.reflect.Method.invoke(Native Method)</FONT>
<BR><FONT SIZE=2> at matrix.db.MatrixClassLoader.invokeObject(MatrixClassLoader.java:323)</FONT>
<BR><FONT SIZE=2> at matrix.db.MatrixClassLoader.invokeObject(MatrixClassLoader.java:340)</FONT>
<BR><FONT SIZE=2> at com.matrixone.jni.MatrixKernel.statelessDispatch(Native Method)</FONT>
<BR><FONT SIZE=2> at com.matrixone.jdl.rmi.bosInterfaceImpl.invokeClass(bosInterfaceImpl.j</FONT>
<BR><FONT SIZE=2>ava:442)</FONT>
<BR><FONT SIZE=2> at com.matrixone.jdl.bosInterfaceShim.invokeClass(bosInterfaceShim.java:</FONT>
<BR><FONT SIZE=2>967)</FONT>
<BR><FONT SIZE=2> at matrix.db.JPO.invokePrivate(JPO.java:210)</FONT>
<BR><FONT SIZE=2> at matrix.db.JPO.invoke(JPO.java:156)</FONT>
<BR><FONT SIZE=2> at com.matrixone.servlet.ExecJPO.doJPO(MatrixMsgServlet.java:241)</FONT>
<BR><FONT SIZE=2> at com.matrixone.servlet.ExecJPO.run(MatrixMsgServlet.java:215)</FONT>
<BR><FONT SIZE=2> at java.lang.Thread.run(Thread.java:479)</FONT>
<BR><FONT SIZE=2>Caused by: java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser</FONT>
</P>
<P><FONT SIZE=2> at java.net.URLClassLoader$1.run(URLClassLoader.java:195)</FONT>
<BR><FONT SIZE=2> at java.security.AccessController.doPrivileged(Native Method)</FONT>
<BR><FONT SIZE=2> at java.net.URLClassLoader.findClass(URLClassLoader.java:183)</FONT>
<BR><FONT SIZE=2> at java.lang.ClassLoader.loadClass(ClassLoader.java:294)</FONT>
<BR><FONT SIZE=2> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:281)</FONT>
<BR><FONT SIZE=2> at java.lang.ClassLoader.loadClass(ClassLoader.java:250)</FONT>
<BR><FONT SIZE=2> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)</FONT>
<BR><FONT SIZE=2> at java.lang.Class.forName0(Native Method)</FONT>
<BR><FONT SIZE=2> at java.lang.Class.forName(Class.java:115)</FONT>
<BR><FONT SIZE=2> at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory</FONT>
<BR><FONT SIZE=2>.java:116)</FONT>
<BR><FONT SIZE=2> at org.jdom.input.SAXBuilder.createParser(SAXBuilder.java:439)</FONT>
<BR><FONT SIZE=2> at org.jdom.input.SAXBuilder.build(SAXBuilder.java:341)</FONT>
<BR><FONT SIZE=2> at org.jdom.input.SAXBuilder.build(SAXBuilder.java:764)</FONT>
<BR><FONT SIZE=2> at MsgDispatch_mxJPOMbYiTwAAAAEAAAAP.dispatch(MsgDispatch_mxJPOMbYiTwAAA</FONT>
<BR><FONT SIZE=2>AEAAAAP.java:102)</FONT>
<BR><FONT SIZE=2> at java.lang.reflect.Method.invoke(Native Method)</FONT>
<BR><FONT SIZE=2> at matrix.db.MatrixClassLoader.invokeObject(MatrixClassLoader.java:323)</FONT>
<BR><FONT SIZE=2> at matrix.db.MatrixClassLoader.invokeObject(MatrixClassLoader.java:340)</FONT>
<BR><FONT SIZE=2> at com.matrixone.jni.MatrixKernel.statelessDispatch(Native Method)</FONT>
<BR><FONT SIZE=2> at com.matrixone.jdl.rmi.bosInterfaceImpl.invokeClass(bosInterfaceImpl.j</FONT>
<BR><FONT SIZE=2>ava:442)</FONT>
<BR><FONT SIZE=2> at com.matrixone.jdl.bosInterfaceShim.invokeClass(bosInterfaceShim.java:</FONT>
<BR><FONT SIZE=2>967)</FONT>
<BR><FONT SIZE=2> at matrix.db.JPO.invokePrivate(JPO.java:210)</FONT>
<BR><FONT SIZE=2> at matrix.db.JPO.invoke(JPO.java:156)</FONT>
<BR><FONT SIZE=2> at com.matrixone.servlet.ExecJPO.doJPO(MatrixMsgServlet.java:241)</FONT>
<BR><FONT SIZE=2> at com.matrixone.servlet.ExecJPO.run(MatrixMsgServlet.java:215)</FONT>
<BR><FONT SIZE=2> at java.lang.Thread.run(Thread.java:479)</FONT>
</P>
</BODY>
</HTML>