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.
Thanks,
Sundeep
Code: |
<bean id="fileVirtualizerFactory" class="com.jaspersoft.jasperserver.api.engine.common.service.impl.SwapFileVirtualizerFactory"> <property name="maxSize" value="400"></property> <!-- <property name="directory" value="${java.io.tmpdir}"></property> --> </bean></td></tr></tbody></table> |
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(Arrays.java:2786)
at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:94)
at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:263)
at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:106)
at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:116)
at java.io.OutputStreamWriter.write(OutputStreamWriter.java:203)
at java.io.Writer.write(Writer.java:140)
at net.sf.jasperreports.engine.export.JRHtmlExporter.exportText(JRHtmlExporter.java:1224)
at net.sf.jasperreports.engine.export.JRHtmlExporter.exportGrid(JRHtmlExporter.java:815)
at net.sf.jasperreports.engine.export.JRHtmlExporter.exportPage(JRHtmlExporter.java:730)
at net.sf.jasperreports.engine.export.JRHtmlExporter.exportReportToWriter(JRHtmlExporter.java:679)
at net.sf.jasperreports.engine.export.JRHtmlExporter.exportReport(JRHtmlExporter.java:389)
JBWEB000236: Servlet.service() for servlet STVPdfServlet threw exception: java.lang.OutOfMemoryError
at java.io.ByteArrayOutputStream.hugeCapacity(ByteArrayOutputStream.java:123) [rt.jar:1.7.0_201]
at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:117) [rt.jar:1.7.0_201]
at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93) [rt.jar:1.7.0_201]
at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:153) [rt.jar:1.7.0_201]
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) [rt.jar:1.7.0_201]