ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

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 = [SAFPRD], 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 = 10.19.4.43 dbPort = 1433 dbId = MSSQLSERVER dbName = REPDU username= yrord001 ] 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 = [SAFPRD], 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)
       

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.

Environment

Release : 6.10

Component : Dollar Universe

Sub-Component: Reporter

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

Additional Information

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