Reporter Reports generation fails with OpenJDK 11
search cancel

Reporter Reports generation fails with OpenJDK 11

book

Article ID: 212419

calendar_today

Updated On:

Products

CA Automic Dollar Universe

Issue/Introduction

Reporter report generation problem with JAVA OPENJDK

Reporter report generation log:
[08 Apr 2021 17:32:02] Report generation in PENDING status
[08 Apr 2021 17:32:02] Report generation in RUNNING status
[08 Apr 2021 17:32:02] Report generation started with the following parameters: COMPANY = [DEMCMP], NODES = [SAE*], TAGS = [*], AREA = [X], APPLICATION = [*], MU = [*], TASK = [*], SESS = [*], UPROC = [*], LANGUAGE = [en], START_DATE = [08/03/2021 17:31:01], END_DATE = [05/04/2021 17:31:00]
[08 Apr 2021 17:32:02] Process ABORTED. Status changed to ABORTED : Could not initialize class sun.awt.X11FontManager

The server.log:

[INFO ] 08 Apr 2021 17:32:02 [pool-1-thread-2] com.orsyp.reppub.server.process.ReportGenerationProcess - [08 Apr 2021 17:32:02]  Initialization of DB instance [ ReportGenerationProcess - name = default dbType = mssqlserver dbHostname = 192.0.2.1 dbPort = 1433 dbId = MSSQLSERVER dbName = REPDU username= <username>] was successful.
[INFO ] 08 Apr 2021 17:32:02 [pool-1-thread-2] com.orsyp.reppub.server.process.ReportGenerationProcess - Report generation started
[INFO ] 08 Apr 2021 17:32:02 [pool-1-thread-2] com.orsyp.reppub.server.process.ReportGenerationProcess - [08 Apr 2021 17:32:02] Report generation in RUNNING status.
[INFO ] 08 Apr 2021 17:32:02 [pool-1-thread-2] com.orsyp.reppub.server.process.ReportGenerationProcess - Report generation is started with the following parameters: COMPANY = [DEMCMP], NODES = [SAE*], TAGS = [*], AREA = [X], APPLICATION = [*], MU = [*], TASK = [*], SESS = [*], UPROC = [*], LANGUAGE = [en], START_DATE = [08/03/2021 17:31:01], END_DATE = [05/04/2021 17:31:00]
[ERROR] 08 Apr 2021 17:32:02 [pool-1-thread-2] com.orsyp.reppub.server.process.ReportGenerationProcess - Error in report generation process. Reason:
java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Class.java:398)
        at java.desktop/sun.font.FontManagerFactory$1.run(FontManagerFactory.java:82)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.desktop/sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
       

Environment

Release : 6.10

Component : Dollar Universe

Sub-Component: Reporter

Cause

If you are using the docker 'slim images' of openjdk, the image no longer includes the packages 'fontconfig', and 'libfreetype6'.

Check the difference in docker file of openjdk:11-slim and the docker file of openjdk:8-slim.

Resolution

The OpenJDK Hotspot 11 Linux Configuration:

- /usr/java/default symbolic link pointed to the OpenJDK
- /usr/java/latest symbolic link pointed to the jre 8 (in case of rollback)
- launch the update-alternative --install "/usr/bin/java" "java" "<my OpenJDK directory>"
- launch the update-alternatives --config java to change the default java to point to the OpenJDK slot

 

For Tomcat, nothing to do as the alternatives is pointed to the OpenJDK
For UVMS 6.10, nothing to do
For Reporter 6.10, you need to install the fonts and its config (OpenJDK does not contain this)


RHEL/Centos : yum install fontconfig dejavu-sans-fonts dejavu-serif-fonts
Debian : apt install fonts-dejavu fontconfig
SLES/OpenSUSE: zypper install libfreetype6 fontconfig dejavu-fonts

Additional Information

UVMS and Reporter are both pointed to /usr/java/default (the OpenJDK)