Jump to content
We've recently updated our Privacy Statement, available here ×

dkommineni

Members
  • Posts

    8
  • Joined

  • Last visited

dkommineni's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Hi, I am trying to generate a jasper report by passing a String parameter. This String parmeter is a text file contents. Some times the text file can be of size 50 MB. I am facing OutOfmemory problem, when the text file size is 50 MB. I have tried using all 3 virtualizers. If you have any suggestion, please reply. Regards Devaraj
  2. Hi, When i am running my Jasper Reports, I am getting the Java Heap Space Out of Memory erros. Please see the code below which i am using. I am actually passing many parameters to the Jasper Reports. One among them is String. Some times this String value contains 50 MB data. When i am passing 50 MB data, system is not able to process the report. before adding 50 MB data, system is querying lot of information from DB and adding the String file content at the end. Please suggest me how to proceed further. The exception is occurred during fill operation. I even tried with File Virtualizer and Swap Virtualizer. Any idea? Code:private File generateReport(File pDownloadDir, String psTemplate, DownloadPatchSetVO pVO, Map pArgs) throws Exception { File ret = null; Connection conn = null; try { conn = ConnectionManager.getDBConnection().connect(); JRAbstractLRUVirtualizer virtualizer = null; virtualizer = new JRGzipVirtualizer(2); pArgs.put(JRParameter.REPORT_VIRTUALIZER, virtualizer); JasperPrint repPrint = JasperFillManager.fillReport (psTemplate,pArgs, conn); String sDocfile = pDownloadDir.getAbsolutePath() + "/" + pVO.getFilename(); if (virtualizer != null) { virtualizer.setReadOnly(true); } JasperExportManager.exportReportToPdfFile(repPrint, sDocfile); ret = new File(sDocfile); } finally { try { if (conn != null) { conn.close(); } } catch (Exception e) { } } return ret; } // generateReport
  3. Are you using virtualizers? If not try using File or Swap or Gzip virtualizers.
  4. Hi , I have even tried using File Virtualizer. But no use. Any suggestions. This is blocking point for my production defect.
  5. Hi, it is happening during fill. I have tried SWAP and GZIP. Let me try File virtualizer also. The report has sub reports. From Java I am passing 50 MB String as parameter to main report and in the main report I am passing again the 50mb string to sub report.
  6. Hi, it is happening during fill. I have tried SWAP and GZIP. Let me try File virtualizer also. Rgds Devaraj
  7. Hi, I even tried by increasing the number of pages for virtualization. e.g: virtualizer = new JRGzipVirtualizer(500); But the result is same.
  8. Hi, When i am running my Jasper Reports, I am getting the Java Heap Space Out of Memory erros. Please see the code below which i am using. I am actually passing many parameters to the Jasper Reports. One among them is String. Some times this String value contains 50 MB data. When i am passing 50 MB data, system is not able to process the report. before adding 50 MB data, system is querying lot of information from DB and adding the String file content at the end. Please suggest me how to proceed further. Code:private File generateReport(File pDownloadDir, String psTemplate, DownloadPatchSetVO pVO, Map pArgs) throws Exception { File ret = null; Connection conn = null; try { conn = ConnectionManager.getDBConnection().connect(); JRAbstractLRUVirtualizer virtualizer = null; virtualizer = new JRGzipVirtualizer(2); pArgs.put(JRParameter.REPORT_VIRTUALIZER, virtualizer); JasperPrint repPrint = JasperFillManager.fillReport (psTemplate,pArgs, conn); String sDocfile = pDownloadDir.getAbsolutePath() + "/" + pVO.getFilename(); if (virtualizer != null) { virtualizer.setReadOnly(true); } JasperExportManager.exportReportToPdfFile(repPrint, sDocfile); ret = new File(sDocfile); } finally { try { if (conn != null) { conn.close(); } } catch (Exception e) { } } return ret; } // generateReport
×
×
  • Create New...