After install JasperReports V7, for CA UIM, the installation procedure was successful, however when any report is executed, the following error is thrown.
Error Message
java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser
The error looks as follow in jasperserver.log
2020-03-06 09:16:37,104 ERROR ErrorPageHandlerAction,http-nio-80-exec-15:115 - Error UID 0919ea29-9e1d-4431-8363-9e555c898928
com.jaspersoft.jasperserver.api.JSException: java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser
...
Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser
Release : UIM9.2.0, 20.X
Component : IM Reporting / Admin / Configuration,Cabi 4.30
Operating System: Red Hat Enterprise Linux 64Bits Server release 7.3, centos 7.8
To resolve the problem in this case, it was required to do next:
1. Open cabi probe Raw Configure->startup->opt, and add a java_opts key, with next in it: -Djava.awt.headless=true
2. install the package called: dejavu-serif-fonts in the Operating System where Jasper/CABI is installed, doing: yum install dejavu-serif-fonts
3. reboot the server where Jasper is installed
You may need to add the -Djava.awt.headless=true entry to the following Jasper config files:
$JASPER_HOME/apache-tomcat/bin/catalina.sh
$JASPER_HOME/apache-tomcat/bin/tools-wrapper.sh
$JASPER_HOME/apache-tomcat/bin/setenv.sh