Jasper Reports Fail to run in a Linux Environment
search cancel

Jasper Reports Fail to run in a Linux Environment

book

Article ID: 8170

calendar_today

Updated On:

Products

CA Spectrum

Issue/Introduction

When attempting to launch a JasperSoft (6.3) report in a Linux Environment the following error is received:

java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment

 

Environment

Spectrum and JasperSoft 6.3

Cause

This is due to a required environment variable missing on the Linux Server.

Resolution

These are the steps to set the property in a Linux environment.

1)    In the <<Jasper Installed Location>>/apache-tomcat/bin please locate and edit the “setenv.sh” file.

2)    In this file in second line please insert this option

JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true"

3)    Please save the file.

4)    Then restart the tomcat server 

# cd <<Jasper Installed Location>>

# ./stopServers.sh

# ./startServers.sh

5) Once the tomcat server has restarted. Please rerun the report. It should now work successfully.