[#9776] - A system error occurred while running it. Exceptions: java.lang.OutOfMemoryError: Java heap space

Category:
Bug report
Priority:
High
Status:
Closed
Project: Severity:
Major
Resolution:
Unable to Reproduce
Component: Reproducibility:
Unable to Reproduce
Assigned to:
0

Hi all,

I have scheduled over 150 report in jasper server and reports fetching data from mongodb. Scheduler runs every day and required to run within 2 hours,i am collecting over 40 millions records every day in mongodb and report fetching data from mongodb.

I am getting Heap space memory error at the time of scheduler runs

Error Message: The job was not completed. A system error occurred while running it. Exceptions: java.lang.OutOfMemoryError: Java heap space

For this issue i have set following parameter in apache tomcat setenv.sh

JAVA_OPTS="-Xms25g -Xmx35g -XX:PermSize=10g -XX:MaxPermSize=20g -Xss2m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled $JAVA_OPTS "

For some report scheduler runs but report not generated

AttachmentSize
Image icon heapspaceerror.png13.31 KB
avinash.rajguru's picture
Joined: Dec 28 2016 - 5:19am
Last seen: 8 months 3 weeks ago

2 Comments:

#1
  • Reproducibility:N/A» Unable to Reproduce
  • Assigned:nobody» anishis

Hello. I am having similar issue with Jasper Report Server - java.lang.OutOfMemoryError: Java heap space. 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)

2019-03-04 22:30:23,532 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/exams/tsw].[STVPdfServlet]] (http-/142.34.233.81:8230-21) 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]

#2
  • Resolution:Open» Unable to Reproduce
  • Status:New» Closed

Unable to reproduce.Please ask your questions to Answers forum before posting here.
https://community.jaspersoft.com/answers

Feedback
randomness