Jasper reports and huge XML as data source
I have a huge one .xml
as a data source (about 100MB). How to prepare pdf file with this xml efficiently and without java.lang.OutOfMemoryError: Java heap space
?
HashMap<String, Object> params = new HashMap<String,Object>();
// below i get: java.lang.OutOfMemoryError
Document document = JRXmlUtils.parse(JRLoader.getLocationInputStream(dataSource));
params.put(JRXPathQueryExecuterFactory.PARAMETER_XML_DATA_DOCUMENT, document);
jasperPrint = JasperFillManager.fillReport(jasperReport, params);
+3
source to share