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

dkommineni

Members
  • Posts

    8
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Downloads

Posts posted by dkommineni

  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. 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...