[jdom-interest] java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
Simon.Hall at transwareplc.com
Simon.Hall at transwareplc.com
Tue May 28 08:26:03 PDT 2002
Hello,
I'm using the following code to validate an xml document:
SAXBuilder builder = new SAXBuilder
("org.apache.xerces.parsers.SAXParser");
//specify that xerces is a validating parser
builder.setValidation(true);
//assign an error handler to xerces to display well-formedness errors
builder.setErrorHandler(new SAXErrorHandler());
builder.setFeature
("http://apache.org/xml/features/validation/schema", true);
//specify that the XML file being parsed is validated against
//SCORM metadata schema
builder.setProperty
("http://apache.org/xml/properties/schema/external-schemaLocation",
ErudigmConstants.IMSMD_ROOT_V1_P2_P1_NS + " " +
TOMCAT_ROOT
+ ErudigmConstants.SCORM_SCHEMA_PATH
+ ErudigmConstants.IMSMD_ROOT_V1_P2_P1_XSD);
Document doc = builder.build(xmlString);
When I execute this I get the following error:
org.jdom.JDOMException: Error in building: SAX2 driver
class org.apache.xerces.parsers.SAXParser not found:
org.apache.xerces.parsers.SAXParser
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:373)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:772)
I'm using the xerces 2 jars in the lib/ext directory and I'm sure their in
the classapath.
Is there another reason why this exception would be thrown, or is it
strictly a classpath issue?
I guess I should also ask if JDOM is compatible with xerces 2.0.1?
Thanks,
[ s i m o n h a l l ]
d e v e l o p e r
More information about the jdom-interest
mailing list