xerces-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rishi Khanna" <ri...@rishikhanna.com>
Subject NoClassDefFoundError with SAXParser
Date Thu, 14 Nov 2002 16:54:30 GMT
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.setFeature("http://xml.org/sax/features/validation", setValidation);
            parser.setFeature("http://xml.org/sax/features/namespaces", setNameSpaces);

            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);
                    byteIn = null;
                    in = null;
            mapStore = null;
            parser = null;
            return true;
        catch (Throwable e) {
            initException = new FatalParseException(e.getMessage());
            return false;

View raw message