Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

not parsing with saxon.jar.......

843834Feb 17 2006 — edited Feb 21 2006
Hi all,

I am using SAX parser to parse the xml file.
Giving the lines of code as follows:
The jar files that r in my server's lib folder are:

i)sax.jar
ii)saxon.jar
iii)saxon-fop.jar
iv)saxon-jdom.jar

when i remove the saxon.jar the code works fine.
but it is required to run the application.So with saxon.jar added it is giving exception.

the exception is :
org.xml.sax.SAXException: The AElfred parser is a SAX2 XMLReader

SAXParserFactory saxparserfactory = SAXParserFactory.newInstance();
try
{
         SAXParser saxparser = saxparserfactory.newSAXParser();
         ParserAdapter parseradapter = new ParserAdapter(saxparser.getParser());
         parseradapter.setContentHandler(handler);
         parseradapter.parse(new InputSource(new FileInputStream(new File(filename))));
            return true ;
        } catch (Throwable t) {
	System.out.println("Exception in cache.oeb.SaxParser.saxParse() ="+t);
            //t.printStackTrace();
	return false ;
        }

}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 21 2006
Added on Feb 17 2006
3 comments
215 views