How to handle huge data with Jasper iReports?

Hi,

I am creating reports using Jasper iReports.when I start running the reports I get the following error.

Filling report...  Locale: English (United States)  Time zone: Default Added additional parameters. Error filling print... java.lang.OutOfMemoryError: GC overhead limit exceeded
Setting up the file resolver... 
Added file resolver... 
Active top component: file_1458297238041.jrxml C:\Users\Administrator\AppData\Local\Temp\2\jstmp\file_1458297238041.jrxml 
net.sf.jasperreports.engine.JRRuntimeException: java.lang.OutOfMemoryError: GC overhead limit exceeded 
    at net.sf.jasperreports.engine.fill.JRFillSubreport.prepare(JRFillSubreport.java:809) 
    at net.sf.jasperreports.components.table.fill.FillTableSubreport.prepareSubreport(FillTableSubreport.java:156) 
    at net.sf.jasperreports.components.table.fill.FillTable.prepare(FillTable.java:400) 
    at net.sf.jasperreports.engine.fill.JRFillComponentElement.prepare(JRFillComponentElement.java:151) 
    at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:332) 
    at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:384) 
    at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:358) 
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillBandNoOverflow(JRVerticalFiller.java:468) 
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnHeader(JRVerticalFiller.java:512) 
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillPageBreak(JRVerticalFiller.java:1966) 
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBreak(JRVerticalFiller.java:1991) 
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:764) 
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:298) 

reenaacharya35's picture
Joined: Mar 17 2016 - 1:32am
Last seen: 7 years 2 months ago

5 Answers:

Hi,
Try increasing the heap size of the tomcat.

Also I read through the following regarding this error;
"The GC throws this exception when too much time is spent in garbage collection for too little return, eg. 98% of CPU time is spent on GC and less than 2% of heap is recovered.

This feature is designed to prevent applications from running for an extended period of time while making little or no progress because the heap is too small.

You can turn this off with the command line option -XX:-UseGCOverheadLimit

More info here "


regards,
KKriplani

kkriplani's picture
5264
Joined: Sep 4 2015 - 2:18am
Last seen: 1 year 1 month ago

Thanks KKriplani for quick reponse.

Actually I am not using eclipse for generating reports.I am creating reports using dataset and table option of iReport.

I read somewhere of using virtualizer in report.But I dont know how to use it.

Any idea how to use virtualizer in iReport designer.

reenaacharya35's picture
Joined: Mar 17 2016 - 1:32am
Last seen: 7 years 2 months ago

Hi,
Virtualizer would be a good option.
Here is the best link for virtualizer I could work with. It will give you the over all detail required and step wise implementation.

Regards,
KKriplani

kkriplani's picture
5264
Joined: Sep 4 2015 - 2:18am
Last seen: 1 year 1 month ago

Hi,

I did changes to "applicationContext.xml" file and added the following lines:

<bean class="com.jaspersoft.jasperserver.api.engine.common.service.impl.GZipVirtualizerFactory"
id="fileVirtualizerFactory">
<property name="maxSize" value="300" />
</bean>

 

Now I am not getting error of "GC overhead limit exceeded"

But I am getting following error:-

1 - Error filling report


java.lang.Exception: 1 - Error filling report 
    at com.jaspersoft.ireport.jasperserver.ws.WSClient.runReport(WSClient.java:403) 
    at com.jaspersoft.ireport.jasperserver.ws.WSClient.runReport(WSClient.java:320) 
    at com.jaspersoft.ireport.jasperserver.ReportRunner.run(ReportRunner.java:70) 
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) 
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) 

 

Any help on this will be greatly appreciated.

Thank You!

reenaacharya35's picture
Joined: Mar 17 2016 - 1:32am
Last seen: 7 years 2 months ago

Hi, 
As I had answered earlier to you;
The some of the probable reasons for "Error filling report" could be as follows;

1) any of the report element is overflowing
2) the total band height/width is exceeding the report height/width respectively.
3) Could be a query issue, etc

However, this error gives almost no perfect idea of what exactly could be the error.
Share the complete log file (jasperserver.log) from <tomcat-directory>/webapps/jasperserver-pro/WEB-INF/logs/ to let us know precisely what the error is."

regards, 
KKriplani

kkriplani's picture
5264
Joined: Sep 4 2015 - 2:18am
Last seen: 1 year 1 month ago
Feedback
randomness