Good afternoon,
 
I have posted this same problem on the JasperForge forums, located at: 
http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=93205
 
The error is only occurring when I turn on the PDF 508 tags, and I thought that 
perhaps some additional info may be found here.  Below is a description of the 
problem I'm encountering and the stacktrace.
 
--------------------

Hello,
I have been tasked with producing a Proof of Concept surrounding the ability to 
produce extremely large reports.  We have been using the Jasper engine within 
an in-house reporting system coupled with iReports, since version .0.6.4.  We 
have recently been asked by our clients to enhance the reporting engine to run 
reports that would easily exceed 1GB in size in PDF format.
I'm currently using version 3.7.0 of the Jasper engine and has the following 
code snippets generating the report.

I'm able to generate a report in PDF I have the compression tag set within the 
exportReportToPdfFile, and use the virtualizer.  However, when I add the 
following tags to turn on the 508 PDF tags, the swap file finishes 
successfully, but at 75-90 MB during the PDF generation I take an OutOfMemory 
exception. 
 I have exhausted nearly every alternative I can think of, but know that the 
problem is somehow tied to the actual PDF generation piece, the fillReport is 
completing and greating a 3.7GB swap file.  The largest report I was able to 
run, without tags turned on was 1.15GB, took 9 hrs to run, with a total of 
623,057 pages, but when I turned the tags on it didn't complete.
Is it trying to create the PDF file in memory only?  I have tried dropping 
Jasperreports' 4.1.2 iText library into the 3.7.0 Jasper engine, version 2.1.7, 
but the same error occurs.  This doesn't appear to be an issue related to the 
virtualizer, however, do the above parameters for the swapFile and invoking the 
virtualizer look practical?  Any assistance would greatly appreciated.
----------------------------JRSwapFile swapFile = new JRSwapFile(tempdir, 4096 
, 4096); System.out.println("Initializing report virtualizer"); virtualizer = 
new JRSwapFileVirtualizer(300, swapFile, true); 
parameters.put(JRParameter.REPORT_VIRTUALIZER, virtualizer); 
System.out.println("parameters: " + parameters); 
System.out.println("virtualizer parameter set - starting pdf creation"); long 
start = System.currentTimeMillis(); System.out.println("fillreport file name: " 
+ qc.getAppProperty("ReportDir") + "/" + rpt); JasperPrint jasperPrint = 
JasperFillManager.fillReport(qc.getAppProperty("ReportDir") + "/" + rpt, 
parameters, conn); System.out.println("fillreport time : " + 
(System.currentTimeMillis() - start)); start = System.currentTimeMillis(); 
System.out.println("beginning PDF export"); 
JasperExportManager.exportReportToPdfFile(jasperPrint, tempdir + "/" + qr.queID 
+ "." + ext); System.out.println("PDF creation time : " + 
(System.currentTimeMillis() - start)); ///////////////////////////// 
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); 
exporter.setParameter(JRPdfExporterParameter.IS_TAGGED, Boolean.TRUE); 
exporter.setParameter(JRPdfExporterParameter.IS_COMPRESSED, Boolean.TRUE); 
exporter.setParameter(JRPdfExporterParameter.FORCE_SVG_SHAPES, Boolean.TRUE); 
exporter.setParameter(JRPdfExporterParameter.TAG_LANGUAGE, "English-US"); 
exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, 
destFileName);----------------------------------------Oct 20, 2011 2:33:24 PM 
com.caucho.hessian.server.HessianSkeleton invoke WARNING: 
java.lang.OutOfMemoryError: Java heap space java.lang.OutOfMemoryError: Java 
heap space at com.lowagie.text.pdf.BidiLine.<init>(Unknown Source) at 
com.lowagie.text.pdf.ColumnText.addWaitingPhrase(Unknown Source) at 
com.lowagie.text.pdf.ColumnText.go(Unknown Source) at 
com.lowagie.text.pdf.ColumnText.go(Unknown Source) at 
net.sf.jasperreports.engine.export.JRPdfExporter.exportText(JRPdfExporter.java:2108)
 at 
net.sf.jasperreports.engine.export.JRPdfExporter.exportElements(JRPdfExporter.java:735)
 at 
net.sf.jasperreports.engine.export.JRPdfExporter.exportPage(JRPdfExporter.java:695)
 at 
net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:584)
 at 
net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:380)
 at 
net.sf.jasperreports.engine.JasperExportManager.exportReportToPdfFile(JasperExportManager.java:130)
 at 
org.ifmc.report.engine.Jasper370Service.runReport(Jasper370Service.java:244) at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585) at 
com.caucho.hessian.server.HessianSkeleton.invoke(HessianSkeleton.java:157) at 
com.caucho.hessian.server.HessianServlet.service(HessianServlet.java:365) at 
weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
 at 
weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
 at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283) 
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175) 
at 
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3395)
 at 
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
 at weblogic.security.service.SecurityManager.runAs(Unknown Source) at 
weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
 at 
weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
 at 
weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366) 
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200) at 
weblogic.work.ExecuteThread.run(ExecuteThread.java:172) Exception in thread 
"Timer-5" java.lang.OutOfMemoryError: Java heap space at 
com.lowagie.text.pdf.BidiLine.<init>(Unknown Source) at 
com.lowagie.text.pdf.ColumnText.addWaitingPhrase(Unknown Source) at 
com.lowagie.text.pdf.ColumnText.go(Unknown Source) at 
com.lowagie.text.pdf.ColumnText.go(Unknown Source) at 
net.sf.jasperreports.engine.export.JRPdfExporter.exportText(JRPdfExporter.java:2108)
 at 
net.sf.jasperreports.engine.export.JRPdfExporter.exportElements(JRPdfExporter.java:735)
 at 
net.sf.jasperreports.engine.export.JRPdfExporter.exportPage(JRPdfExporter.java:695)
 at 
net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:584)
 at 
net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:380)
 at 
net.sf.jasperreports.engine.JasperExportManager.exportReportToPdfFile(JasperExportManager.java:130)
 at 
org.ifmc.report.engine.Jasper370Service.runReport(Jasper370Service.java:244) at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585) at 
com.caucho.hessian.server.HessianSkeleton.invoke(HessianSkeleton.java:157) at 
com.caucho.hessian.server.HessianServlet.service(HessianServlet.java:365) at 
weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
 at 
weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
 at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283) 
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175) 
at 
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3395)
 at 
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
 at weblogic.security.service.SecurityManager.runAs(Unknown Source) at 
weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
 at 
weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
 at 
weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366) 
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200) at 
weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
 

CONFIDENTIALITY NOTICE: This communication, including any attachments, may 
contain confidential information and is intended only for the individual or 
entity to whom it is addressed.  Any review, dissemination, or copying of this 
communication by anyone other than the intended recipient is strictly 
prohibited.  If you are not the intended recipient, please notify us 
immediately by reply email to priv...@telligen.org and delete or destroy all 
copies of the original message and any attachments thereto. Email sent to or 
from Telligen or any of its member companies may be retained as required by law 
or regulation.
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to