Jasper 6.4.x - Error on server when running report

Document ID : KB000112552
Last Modified Date : 09/10/2018
Show Technical Document Details
Issue:
The following error is seen when running any report:

Error Message There was an error on the server. Try again or contact site administrators. (Error UID: d9a8c507-975e-4a7f-999e-32a7e3b67f83)

In the jasperserver.log file located in $JASPERINSTALLDIR/apache-tomcat/webapps/jasperserver-pro/WEB-INF/logs/ directory there are X11 errors seen as well.
Resolution:
Add -Djava.awt.headless=true to the setenv.sh file in the $JASPERINSTALLDIR/apache-tomcat/bin directory. 


JAVA_OPTS="$JAVA_OPTS -Xms4096m -Xmx6144m" 
JAVA_OPTS="$JAVA_OPTS -Xss2m -XX:+UseConcMarkSweepGC" 
JAVA_OPTS="$JAVA_OPTS -XX:+CMSClassUnloadingEnabled" 
Filename=/root/.cabusinessintelligence 
javapath=`grep "Location" $Filename | awk -F"=" '{print $2}'` 
export JAVA_HOME=$javapath"/java" 
echo $JAVA_HOME 


export JAVA_OPTS="$JAVA_OPTS -Djs.license.directory=../webapps/jasperserver-pro" 

Once the updates have been made to the setenv.sh file, stop and start the Jasper Tomcat Server.


To: 

JAVA_OPTS="$JAVA_OPTS -Xms4096m -Xmx6144m" 
JAVA_OPTS="$JAVA_OPTS -Xss2m -XX:+UseConcMarkSweepGC" 
JAVA_OPTS="$JAVA_OPTS -XX:+CMSClassUnloadingEnabled" 
JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true" 
Filename=/root/.cabusinessintelligence 
javapath=`grep "Location" $Filename | awk -F"=" '{print $2}'` 
export JAVA_HOME=$javapath"/java" 
echo $JAVA_HOME 


export JAVA_OPTS="$JAVA_OPTS -Djs.license.directory=../webapps/jasperserver-pro"