The SAX exception occurs in Tansformer.transform() for a very large xml string as input ----------------------------------------------------------------------------------------
Key: XALANJ-2537 URL: https://issues.apache.org/jira/browse/XALANJ-2537 Project: XalanJ2 Issue Type: Bug Security Level: No security risk; visible to anyone (Ordinary problems in Xalan projects. Anybody can view the issue.) Components: SAX Affects Versions: 2.7 Environment: Linux Reporter: Deepthi BakkaVemana Priority: Blocker We are using xalan 2.7.0 and fop 0.95 for generating PDF reports.While generating pdf report for a large xml string of 2,96,126 characters(~ nearly 3 lakh characters) ,the PDF generation fails and it fails at transformer.transform() method in TransformerImpl.java.Since in our product,we need large reports with very large strings(events),we need this fix ASAP. TransformerFactory factory = TransformerFactory.newInstance(); Templates templates = factory.newTemplates(new SAXSource(new InputSource( new StringReader(xslContent)))); Transformer transformer = templates.newTransformer(); // Set the value of a <param> in the stylesheet transformer.setParameter("versionParam", "2.0"); Result res = new SAXResult(fop.getDefaultHandler()); String parserClass = "com.sun.org.apache.xerces.internal.parsers.SAXParser"; if (((String) System.getProperties().get("java.version")).startsWith("1.4")) { parserClass = "org.apache.crimson.parser.XMLReaderImpl"; } //String parserClass = "org.apache.crimson.parser.XMLReaderImpl"; XMLReader reader = XMLReaderFactory.createXMLReader(parserClass); Source source = new SAXSource(reader, new InputSource(bufferedInputStream)); transformer.transform(source, res); - this is the point of failure.. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: xalan-dev-unsubscr...@xml.apache.org For additional commands, e-mail: xalan-dev-h...@xml.apache.org