We are working on enabling reporting in our CA Spectrum environment, and to that end we installed a Report Manager server and CABI 6.3. However, after doing the integration, we are unable to run reports (I am running the top N most common alarms report as a test). We get one of two errors in the UI (and in catalina.out in CABI):
com.jaspersoft.jasperserver.api.JSException: java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment
com.jaspersoft.jasperserver.api.JSException: java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser
Linux RHEL 7
Jaspersoft Java is trying to connect to an X11 display. Either X11 library files are not installed, or Java does not have to connect to a display and the error can be bypassed.
1. Include the following JAVA-OPTS in Jasper startup script: -Djava.awt.headless=true
Locate the file in <CABI INSTALL>/apache-tomcat/bin/catalina.sh
Modify the file for the following. Add CATALINA_OPTS="$CATALINA_OPTS -Djava.awt.headless=true"
Restart CABI Tomcat server
Additional info on the error and solution:
There are two other suggestions for workaround to the error:
1. Install xorg-x11-Xvfb-6.8.1-23.EL.i386.rpm
2. set system property to java.awt.headless=true