Hi everybody,
I’m opening this thread to report an error I am facing when trying to compile and save a report from a JasperReport template.
Here is the error I get:
net.sf.jasperreports.engine.JRException
at com.aspose.words.jasperreports.AWAbstractExporter.exportReport(Unknown Source)
at com.agews.suite626.servlet.old.Servlet.export(Servlet.java:198)
at com.agews.suite626.servlet.old.Servlet.compile(Servlet.java:744)
at com.agews.suite626.servlet.old.ReportRumore.compile(ReportRumore.java:146)
at com.agews.suite626.servlet.old.ReportRumore.process(ReportRumore.java:46)
at com.agews.suite626.servlet.old.Servlet.doPost(Servlet.java:161)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: 210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: 123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java: 472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java: 171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java: 99)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java: 118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java: 408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java: 1852)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
The export method is the following:
protected byte[] export (JasperPrint jasperPrint, JRExporter exporter) throws JRException
{
ByteArrayOutputStream baos = new ByteArrayOutputStream();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, baos);
exporter.exportReport();
return baos.toByteArray();
}
where JRExporter exporter is actually an instance of AWDocExporter.
I have located the problem in the page break which is present in sub_report_1.jrxml of report 99_35, in fact if I remove it, all works as expected.
However, I do not understand why it would cause an error, in fact there are other page breaks in other reports, which works, and the PAGE_BREAKS export option is set to export them as normal.
I have attached a .zip archive containing both the report template and its .jrprint