search cancel

FontConfiguration X11 error in db load ucybdbld.jar using Openjdk on Linux

book

Article ID: 239487

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

On a newly installed AE Linux server where Openjdk 11.x was used, the DB Load tool (ucybdbld.jar)  does not start the X11 window in the remote desktop with the following error:

/opt/uc4/uc4act/Utility/bin> java -jar ucybdbld.jar
Exception in thread "main" java.lang.InternalError: java.lang.reflect.InvocationTargetException
at java.desktop/sun.font.FontManagerFactory$1.run(FontManagerFactory.java:86)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.desktop/sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
at java.desktop/sun.font.SunFontManager.getInstance(SunFontManager.java:249)
at java.desktop/sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:265)
...
at com.ucutil.ucdbload.CUCYDBLoad.main(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at java.desktop/sun.font.FontManagerFactory$1.run(FontManagerFactory.java:84)
... 43 more
Caused by: java.lang.NullPointerException
at java.desktop/sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1262)
at java.desktop/sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:225)
at java.desktop/sun.awt.FontConfiguration.init(FontConfiguration.java:107)
at java.desktop/sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:719)
at java.desktop/sun.font.SunFontManager$2.run(SunFontManager.java:379)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.desktop/sun.font.SunFontManager.<init>(SunFontManager.java:324)
at java.desktop/sun.awt.FcFontManager.<init>(FcFontManager.java:35)
at java.desktop/sun.awt.X11FontManager.<init>(X11FontManager.java:56)
... 48 more

Environment

Release : 12.x and 21.x

Component : AUTOMATION ENGINE

Sub-Component: Any graphical tool that requires X11, such as dbload

Cause

By default, Openjdk does not include the necessary fonts and font configurations in Linux/Unix distributions.

Resolution

The problem is related to the lack of fonts and font configuration within the Openjdk versions of Java.
in order to fix it, please install the necessary packages in the Server hosting the Automation Engine according to your distribution as mentioned here

For Linux:

Debian/Ubuntu/Mint: apt-get install libfreetype6 fontconfig fonts-dejavu
RHEL/CentOS/Fedora: yum install freetype fontconfig dejavu-sans-fonts
SLES/OpenSUSE: zypper install libfreetype6 fontconfig dejavu-fonts