Skip to Content
0
Former Member
Jun 05, 2009 at 06:23 AM

NO SAX parser issue

144 Views

Hello, <br>

We are using crystal enterprise SDK connect to RAS server to retrieve reports. Our environment is websphere5.1, and we are using jvm 1.4.2.<br>

During testing, we found out that occasionally, and very randomly that RAS SDK throws following exception:<br>

java.lang.NoClassDefFoundError: No SAX parser is available

            at com.crystaldecisions.xml.serialization.XMLObjectSerializer.<init>(Unknown Source)

            at com.crystaldecisions.sdk.occa.managedreports.ras.internal.CECORBACommunicationAdapter.<init>(Unknown Source)

            at com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.a(Unknown Source)

            at com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.a(Unknown Source)

            at com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.openDocument(Unknown Source)

            at com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.openDocument(Unknown Source)

We trace down the issue by decompiling XMLObjectSerializer from RAS SDK, and discover where the exception comes from: <br>

       try
        {
            a = XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser");
        }
        catch(SAXException saxexception)
        {
            try
            {
                a = XMLReaderFactory.createXMLReader("org.apache.crimson.parser.XMLReaderImpl");
            }
            catch(SAXException saxexception1)
            {
                try
                {
                    a = XMLReaderFactory.createXMLReader("gnu.xml.aelfred2.XmlReader");
                }
                catch(SAXException saxexception2)
                {
                    try
                    {
                        a = XMLReaderFactory.createXMLReader();
                    }
                    catch(SAXException saxexception3)
                    {
                        throw new NoClassDefFoundError("No SAX parser is available");
                    }
                }
            }

We are not sure why SDK couldn't find parser as we have included xerces.jar, xalan.jar, and xml-apis.jar into the library. Furthermore, it happens so rarely and randomly that it is very hard to reproduce. We are uncertain about whether this is due to websphere class loader issue or RAS SDK. Has anyone encounter similar issue before? Please advice. Thanks.<br>

Meanwhile, we may get the other two parsers to see if they can make system error free.<br>

mlie

Edited by: mlie on Jun 5, 2009 8:23 AM