|
Hello Everyone,
I have been using the Xerces J SAXParser for some
time now. I recently made a modification to my codebase, only to find that
I am now getting a NoClassDefFoundError when I call the
SAXParser.parse(InputSource in) method.
The xercesImpl JAR is still in my classpath.
My changes had nothing to do with how I am using the parser. Furthermore,
I am still able to set the handlers and features.
I would really appreciate any help you guys can
give me in regards to solving this problem....Thanks in advance...
Rishi
Here is the code segment:
XMLReader parser = (XMLReader)
Class.forName(DEFAULT_PARSER_NAME).newInstance();
if (parser == null) { return false; } parser.setContentHandler(mapStore); parser.setErrorHandler(mapStore);
parser.setFeature("http://xml.org/sax/features/validation",
setValidation);
parser.setFeature("http://xml.org/sax/features/namespaces", setNameSpaces); parser.setFeature( "http://apache.org/xml/features/validation/schema", setSchemaSupport);
InputStream
byteIn;
for (int i=0; i < fileList.length; i++) { String filePath = MyFileManager.getConfigFolder() + fileList[i]; byteIn = new FileInputStream(filePath); if (byteIn == null) { initException = new NonFatalParseException("Failed loading one or more configuration files."); } else { InputSource in = new InputSource(byteIn); parser.parse(in); MyFileManager.addLoadedFiles(fileList[i]); byteIn = null; in = null; } } mapStore = null; parser = null; return true; } catch (Throwable e) { initException = new FatalParseException(e.getMessage()); return false; } |
- Re: NoClassDefFoundError with SAXParser Rishi Khanna
- Re: NoClassDefFoundError with SAXParser N. Ganesh Babu
