Jasper Reports service is suddenly crashing, this occur after running a report
search cancel

Jasper Reports service is suddenly crashing, this occur after running a report

book

Article ID: 193112

calendar_today

Updated On:

Products

CA Service Management - Service Desk Manager CA Service Desk Manager

Issue/Introduction

Jasper Server stops working after running a report, if the service is restarted the application works without issue.

Environment

Release : 17.1

Component : JASPERSOFT REPORTS FOR SERVICE MANAGEMENT

Cause

The issue was caused by the report that was to big to run and retrieved more data than the JVM could handle, the jasperlog would have an error similar to this

ERROR SystemErrorController,http-nio-8080-exec-141:83 - Internal server error
javax.servlet.ServletException: org.glassfish.jersey.server.ContainerException: java.lang.OutOfMemoryError: Java heap space

Resolution

For Windows 

1. Open this file for editing:
<Jasper installation directory>/apache-tomcat/bin/ setclasspath.bat

2. Look for JAVA_OPTS

 SET "JAVA_OPTS=-Xms1024m -Xmx2048m -XX:PermSize=32m -XX:MaxPermSize=512m -Xss2m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled"

3. Update this line to increase the maximum heap size -Xmx

 

For Tomcat as Windows service

1. Open this file for editing:
<Jasper installation directory>apache-tomcat/bin/service.bat

2. Look for the following line to change the JVM heap size, for example:

"%EXECUTABLE%" //US//%SERVICE_NAME% --Startup auto --JvmOptions "-Xms1024M;-Xmx2048M;-Xss2M;-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.endorsed.dirs=%CATALINA_HOME%\endorsed" --StartMode jvm --StopMode jvm

3. Update this line to increase the maximum heap size -Xmx

Notes: If Tomcat is installed as a service, you need to re-install the service.

Additional Information

Windows Service How-To