Dear All. I am having a great problem on generating PDF file by Crystal Report in J2EE. I have my J2EE application runs Crystal Report to generate PDF files. However for a report, i hit the following error (red color) when the PDF is generating. When i re-generate the same report the following error (green color) occur. But is no problem for the other reports. Here is the code (blue color) that i used to generate the PDF My OS and Java version as follows Window 2003 server. Java 1.4.2_04 My CRConfig.xml setting as follows (grey color) Please Kindly Help Thanks very much Angus Tau <?xml version="1.0" encoding="utf-8"?><CrystalReportEngine-configuration> <reportlocation>../..</reportlocation> <timeout>5000</timeout> <ExternalFunctionLibraryClassNames> <classname> </classname> <classname> </classname> </ExternalFunctionLibraryClassNames> <keycode>B6W60-01CS200-000UK40-02Y0</keycode> <Javaserver-configuration> <DataDriverCommon> <!--JavaDir>C:\apps\j2sdk1.4.2_04\bin</JavaDir--> <JavaDir>C:\Program Files\Business Objects\JRE\bin</JavaDir> <Classpath>C:\Program Files\Common Files\Business Objects\3.0\java/lib/crlovmanifest.jar;C:\Program Files\Common Files\Business Objects\3.0\java/lib/CRLOVExternal.jar;C:\Program Files\Common Files\Business Objects\3.0\java/lib/CRDBJavaServerCommon.jar;C:\Program Files\Common Files\Business Objects\3.0\java/lib/CRDBJavaServer.jar;C:\Program Files\Common Files\Business Objects\3.0\java/lib/CRDBJDBCServer.jar;C:\Program Files\Common Files\Business Objects\3.0\java/lib/CRDBXMLServer.jar;C:\Program Files\Common Files\Business Objects\3.0\java/lib/CRDBJavaBeansServer.jar;C:\Program Files\Common Files\Business Objects\3.0\java/lib/external/CRDBXMLExternal.jar;C:\Program Files\Common Files\Business Objects\3.0\java/lib/external/log4j.jar;C:\Program Files\Common Files\Business Objects\3.0\java/lib/cecore.jar;C:\Program Files\Common Files\Business Objects\3.0\java/lib/celib.jar;C:\Program Files\Common Files\Business Objects\3.0\java/lib/ebus405.jar;C:\Program Files\Common Files\Business Objects\3.0\java/lib/corbaidl.jar;C:\Program Files\Common Files\Business Objects\3.0\java/lib/external/freessl201.jar;C:\Program Files\Common Files\Business Objects\3.0\java/lib/external/asn1.jar;C:\Program Files\Common Files\Business Objects\3.0\java/lib/external/certj.jar;C:\Program Files\Common Files\Business Objects\3.0\java/lib/external/jsafe.jar;C:\Program Files\Common Files\Business Objects\3.0\java\lib\mysql-connector-java-3.0.17-ga-bin.jar;C:\Program Files\Common Files\Business Objects\3.0\java/lib/external/sslj.jar;${CLASSPATH}</Classpath> <IORFileLocation>${TEMP}</IORFileLocation> <JavaServerTimeout>1800</JavaServerTimeout> <!-- <JVMMaxHeap>1536000000</JVMMaxHeap> --> <JVMMaxHeap>2560000000</JVMMaxHeap> <JVMMinHeap>1024000000</JVMMinHeap> <NumberOfThreads>500</NumberOfThreads> </DataDriverCommon> <JDBC> <CacheRowSetSize>100</CacheRowSetSize> <JDBCURL></JDBCURL> <JDBCClassName></JDBCClassName> <JDBCUserName></JDBCUserName> <JNDIURL></JNDIURL> <JNDIConnectionFactory></JNDIConnectionFactory> <JNDIInitContext>/</JNDIInitContext> <JNDIUserName>weblogic</JNDIUserName> <GenericJDBCDriver> <Option>No</Option> <DatabaseStructure>catalogs,tables</DatabaseStructure> <StoredProcType>Standard</StoredProcType> <LogonStyle>MySql</LogonStyle> </GenericJDBCDriver> </JDBC> <XML> <CacheRowSetSize>100</CacheRowSetSize> <PreReadNBytes>4096</PreReadNBytes> <XMLLocalURL></XMLLocalURL> <SchemaLocalURL></SchemaLocalURL> <XMLHttpURL></XMLHttpURL> <SchemaHttpURL></SchemaHttpURL> </XML> <JavaBeans> <CacheRowSetSize>100</CacheRowSetSize> <JavaBeansClassPath></JavaBeansClassPath> </JavaBeans> </Javaserver-configuration> </CrystalReportEngine-configuration>
public static void export(HttpServletRequest request, HttpServletResponse response, String reportPath, ArrayList paramList, ReportExportFormat outFormat) throws Exception{ System.gc(); HttpSession session = request.getSession(false); Object reportSource = getReportSource(request, reportPath); ReportExportControl exportControl = new ReportExportControl(); if(paramList != null && paramList.size()>0){ exportControl.setParameterFields(getParamFields(paramList)); } ExportOptions exportOptions = new ExportOptions(); exportOptions.setExportFormatType(outFormat); PDFExportFormatOptions pdfexpopts = new PDFExportFormatOptions(); exportOptions.setFormatOptions(pdfexpopts); exportControl.setReportSource(reportSource); exportControl.setExportOptions(exportOptions); exportControl.processHttpRequest(request, response, session.getServletContext(), null); exportControl.dispose(); }
public static IReportSource getReportSource(HttpServletRequest request, String reportPath) throws Exception{ ReportClientDocument oReportClientDocument = new ReportClientDocument(); HttpSession session = request.getSession(false); oReportClientDocument.open(reportPath, 0); return oReportClientDocument.getReportSource(); } 00:57:08,671 ERROR reportdefinition Thread-28 - Report printer was not valid, switching to default printer. 00:57:08,687 ERROR objectformatter Thread-28 - com.crystaldecisions.reports.dataengine.k: |Y 00:57:09,343 ERROR b Thread-28 - Disk Exporter: no output file was created by an exporter 00:57:09,343 ERROR b Thread-28 - PdfExporter: caught Exception in PDFFormatter.finalizeFormatJob (from destination?); aborting export java.lang.IllegalArgumentException at com.crystaldecisions.reports.exporters.destination.disk.b.a(Unknown Source) at com.crystaldecisions.reports.exporters.format.page.pdf.b.a(Unknown Source) at com.crystaldecisions.reports.formatter.a.b.a(Unknown Source) at com.crystaldecisions.reports.reportengineinterface.g.a(Unknown Source) at com.crystaldecisions.reports.reportengineinterface.JPEReportSource.export(Unknown Source) at com.crystaldecisions.report.web.event.bn.a(Unknown Source) at com.crystaldecisions.report.web.event.u.a(Unknown Source) at com.crystaldecisions.report.web.component.g.for(Unknown Source) at com.crystaldecisions.report.web.component.g.a(Unknown Source) at com.crystaldecisions.report.web.component.g.if(Unknown Source) at com.crystaldecisions.report.web.component.n.a(Unknown Source) at com.crystaldecisions.report.web.event.b1.broadcast(Unknown Source) at com.crystaldecisions.report.web.event.as.a(Unknown Source) at com.crystaldecisions.report.web.WorkflowController.if(Unknown Source) at com.crystaldecisions.report.web.WorkflowController.doLifecycle(Unknown Source) at com.crystaldecisions.report.web.ServerControl.a(Unknown Source) at com.crystaldecisions.report.web.viewer.ReportExportControl.a(Unknown Source) at com.crystaldecisions.report.web.ServerControl.processHttpRequest(Unknown Source) at com.satau.os.util.CrystalReportUtil.export(CrystalReportUtil.java:112) at com.satau.os.util.CrystalReportUtil.exportPdf(CrystalReportUtil.java:57) at com.satau.os.master.web.CrystalReportAction.savePdf(CrystalReportAction.java:134) at sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280) at com.satau.os.master.web.CrystalReportAction.execute(CrystalReportAction.java:47) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.satau.os.web.filter.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Thread.java:534) 00:56:56,828 ERROR b Thread-17 - PdfExporter: caught Exception in PDFFormatter.finalizeFormatJob (from destination?); aborting export java.lang.IllegalArgumentException at com.crystaldecisions.reports.exporters.destination.disk.b.a(Unknown Source) at com.crystaldecisions.reports.exporters.format.page.pdf.b.a(Unknown Source) at com.crystaldecisions.reports.formatter.a.b.a(Unknown Source) at com.crystaldecisions.reports.reportengineinterface.g.a(Unknown Source) at com.crystaldecisions.reports.reportengineinterface.JPEReportSource.export(Unknown Source) at com.crystaldecisions.report.web.event.bn.a(Unknown Source) at com.crystaldecisions.report.web.event.u.a(Unknown Source) at com.crystaldecisions.report.web.component.g.for(Unknown Source) at com.crystaldecisions.report.web.component.g.a(Unknown Source) at com.crystaldecisions.report.web.component.g.if(Unknown Source) at com.crystaldecisions.report.web.component.n.a(Unknown Source) at com.crystaldecisions.report.web.event.b1.broadcast(Unknown Source) at com.crystaldecisions.report.web.event.as.a(Unknown Source) at com.crystaldecisions.report.web.WorkflowController.if(Unknown Source) at com.crystaldecisions.report.web.WorkflowController.doLifecycle(Unknown Source) at com.crystaldecisions.report.web.ServerControl.a(Unknown Source) at com.crystaldecisions.report.web.viewer.ReportExportControl.a(Unknown Source) at com.crystaldecisions.report.web.ServerControl.processHttpRequest(Unknown Source) at com.satau.os.util.CrystalReportUtil.export(CrystalReportUtil.java:112) at com.satau.os.util.CrystalReportUtil.exportPdf(CrystalReportUtil.java:57) at com.satau.os.master.web.CrystalReportAction.savePdf(CrystalReportAction.java:134) at sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280) at com.satau.os.master.web.CrystalReportAction.execute(CrystalReportAction.java:47) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.satau.os.web.filter.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Thread.java:534) 00:56:56,937 ERROR JPEReportSource Thread-17 - Exception while processing export request: java.lang.OutOfMemoryError
|