Error during report generating in RPM installations

Report is not getting generated/sent over email.


Observing error in file /usr/local/openiam/ui/logs/catalina.out when generating report:

2022-11-10 10:04:20.287 ERROR 8345 --- [io-8080-exec-12] o.s.b.w.s.s.ErrorPageFilter : Forwarding to error page from request [/api/reports] due to exception [Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser]
java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser


2022-11-11 11:13:15.715 ERROR 61056 --- [nio-8080-exec-5] n.s.j.e.f.SimpleFontExtensionHelper : Error loading font family
net.sf.jasperreports.engine.fonts.InvalidFontException: Error loading font "net/sf/jasperreports/fonts/dejavu/DejaVuSans.ttf".

Reason: OS doesn't have needed fonts/packages installed

To fix it follow instruction:

  1. yum install fontconfig
  2. yum install ttf-dejavu-extra
  3. in file /usr/local/openiam/ui/bin/ add into JAVA_OPTS -Djava.awt.headless=true
  4. restart openiam-ui service