Error while accessing smconsole using Adopt open jdk
search cancel

Error while accessing smconsole using Adopt open jdk

book

Article ID: 202538

calendar_today

Updated On:

Products

SITEMINDER CA Single Sign On Agents (SiteMinder) CA Single Sign On Federation (SiteMinder) CA Single Sign On Secure Proxy Server (SiteMinder) CA Single Sign-On

Issue/Introduction

 

Having installed Policy Server on RedHat 7, and when the smconsole
starts from the command line, the smconsole can't start and reports
error :

  [smuser@mypolicyserver bin]$ ./smconsole

  Exception in thread "main" java.lang.NullPointerException
   at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264)
   at sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:219)
   at sun.awt.FontConfiguration.init(FontConfiguration.java:107)
   at sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:774)
   at sun.font.SunFontManager$2.run(SunFontManager.java:431)

 

 

Environment

 

  Policy Server 12.8SP3 on RedHat 7;
  AdoptOpenJDK jdk8u252-b09;

 

Resolution

 

- In the AdoptOpenJDK folder $JAVA_HOME/lib, create a file called 

  fontconfig.properties

  and in this file put the following 2 lines :

  version=1 
  sequence.allfonts=default

- Try removing jre/lib/amd64/libfreetype.so.6 as per this note :

  NPE at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264) when using install4j caused by font config missing

    It means the included jre/lib/amd64/libfreetype.so.6 is not compatible
    with system fontconfig. I removed jre/lib/amd64/libfreetype.so.6 and
    problem solved.

  https://github.com/AdoptOpenJDK/openjdk-build/issues/693

- Run the command as root :

  # rpm -qa > rpm.txt

  and attach rpm.txt to the case to see if you have these packages
  installed :

  NPE at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264) when using install4j caused by font config missing

    Installing packages fontconfig and urw-fonts on CentOS 6 & 7 fixed the issue.

    Using adoptopenjdk/openjdk11-openj9:jdk-11.0.7_10_openj9-0.20.0-alpine-slim
    I just had to run :
    apk add --no-cache fontconfig ttf-dejavu

    On Red Hat 7.7, we first tried the creating fontconfig.properties with no joy.
    We had fontconfig installed, but not urw-fonts.
    Installing the superseding package urw-base35-fonts resolved the issue.

  https://github.com/AdoptOpenJDK/openjdk-build/issues/693