Jasper Reports Library used in Java Code and Exporting to PDF generates Exception

0

I am working on a web application and using Jasper Reports library (jasperreports-4.8.0.jar). In the application, I have a function to export some generated data (from a database) into PDF format. In particular, net.sf.jasperreports.engine.export.JRPdfExporter.exportReport() function is called. As I got to know, the jasper library internally uses itext for its PDF generation. I also have itext-2.1.7.jar in my classpath, which I hope is used in the PDF generation.

The trace of exception I get is (partially):

java.lang.ArrayIndexOutOfBoundsException [10/21/14 19:13:09:366 SGT] 00000030 SystemErr R at com.lowagie.text.pdf.TrueTypeFontSubSet.checkGlyphComposite(Unknown Source) [10/21/14 19:13:09:366 SGT] 00000030 SystemErr R at com.lowagie.text.pdf.TrueTypeFontSubSet.flatGlyphs(Unknown Source) [10/21/14 19:13:09:366 SGT] 00000030 SystemErr R at com.lowagie.text.pdf.TrueTypeFontSubSet.process(Unknown Source) [10/21/14 19:13:09:366 SGT] 00000030 SystemErr R at com.lowagie.text.pdf.TrueTypeFontUnicode.writeFont(Unknown Source) [10/21/14 19:13:09:366 SGT] 00000030 SystemErr R at com.lowagie.text.pdf.FontDetails.writeFont(Unknown Source) [10/21/14 19:13:09:366 SGT] 00000030 SystemErr R at com.lowagie.text.pdf.PdfWriter.addSharedObjectsToBody(Unknown Source) [10/21/14 19:13:09:366 SGT] 00000030 SystemErr R at com.lowagie.text.pdf.PdfWriter.close(Unknown Source) [10/21/14 19:13:09:366 SGT] 00000030 SystemErr R at com.lowagie.text.pdf.PdfDocument.close(Unknown Source) [10/21/14 19:13:09:366 SGT] 00000030 SystemErr R at com.lowagie.text.Document.close(Unknown Source) [10/21/14 19:13:09:366 SGT] 00000030 SystemErr R at net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:707) [10/21/14 19:13:09:366 SGT] 00000030 SystemErr R at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:396) [10/21/14 19:13:09:366 SGT] 00000030 SystemErr R at net.sf.jasperreports.engine.JasperExportManager.exportToPdf(JasperExportManager.java:212) [10/21/14 19:13:09:366 SGT] 00000030 SystemErr R at net.sf.jasperreports.engine.JasperExportManager.exportReportToPdf(JasperExportManager.java:536)

My question: How to get rid of this error ? What's causing this ArrayIndexOutOfBoundsException ? Note: The jasper report (original file: report.jrxml) compiles successfully (compiled file: report.jasper) in iReport ver. 4.8.0, meaning the report query is also valid and ok.

PS: I have tried variations of itext-2.1.5, jasperreports-5.6.1 libraries. However they seem to be not solving the problem.

 

 

sid1's picture
2
Joined: Oct 21 2014 - 5:13am
Last seen: 4 years 11 months ago

0 Answers:

No answers yet
Feedback
randomness