Jump to content
Changes to the Jaspersoft community edition download ×

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


sid1

Recommended Posts

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.


 


 


Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...