java.lang.OutOfMemoryError: Java heap space issue in exporting the larger reports

Hi All,

We are experienceing the java.lang.OutOfMemoryError: Java heap space issue in exporting the larger reports. We have exported the reports that having 6000 pages approx first to excel(pagenated). The export was working fine. After that we have tried to export the another report that having 5000 pages approx. Now we  experienced the java.lang.OutOfMemoryError: Java heap space issue. We are using SweapFileVirtualizer. It seems buffer is not cleared.

S/W & H/W details:

1. jasperreports-server-cp-4.5.0

2. OS : Windows XP Professional Version 2002

3. RAM 2 GB

JVM setting

set JAVA_OPTS=%JAVA_OPTS% -Xms1024m -Xmx2048m -XX:PermSize=32m -XX:MaxPermSize=128m -Xss2m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled

Attached are the server log. Help from any one is appreciated.





<bean id="fileVirtualizerFactory" class="com.jaspersoft.jasperserver.api.engine.common.service.impl.SwapFileVirtualizerFactory">
        <property name="maxSize" value="400"></property>
        <!-- <property name="directory" value="${}"></property> -->
dhankarsundeep's picture
Joined: Feb 29 2012 - 9:20pm
Last seen: 11 years 3 months ago

Hello. I am having similar issue with Jasper Report Server - java.lang.OutOfMemoryError: Java heap space, on upgrading to Jasper Report 6.5.1.This is making the application completely unresponsive.

The issue occurs at multiple locations and logs provided below. I have set the JVM Heap space to 8GB, but still does not help. Please let me know if you have any solutions. Thanks in advance.

java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(
at sun.nio.cs.StreamEncoder.writeBytes(
at sun.nio.cs.StreamEncoder.implWrite(
at sun.nio.cs.StreamEncoder.write(
at sun.nio.cs.StreamEncoder.write(
at net.sf.jasperreports.engine.export.JRHtmlExporter.exportText(
at net.sf.jasperreports.engine.export.JRHtmlExporter.exportGrid(
at net.sf.jasperreports.engine.export.JRHtmlExporter.exportPage(
at net.sf.jasperreports.engine.export.JRHtmlExporter.exportReportToWriter(
at net.sf.jasperreports.engine.export.JRHtmlExporter.exportReport(

JBWEB000236: Servlet.service() for servlet STVPdfServlet threw exception: java.lang.OutOfMemoryError
    at [rt.jar:1.7.0_201]
    at [rt.jar:1.7.0_201]
    at [rt.jar:1.7.0_201]
    at [rt.jar:1.7.0_201]
    at [rt.jar:1.7.0_201]

ashwinlunkad - 4 years 2 months ago

0 Answers:

No answers yet