search cancel

Java Error when trying to Load RA Solution - Linux/Unix

book

Article ID: 89861

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

Java Error when trying to Load RA Solution - Linux/Unix

Environment

Release: AOATAM99000-9.0-Automic-One Automation Tools-Application Manager
Component:

Resolution

Symptoms

Loading RA Solutions from the command line use executable jar file, ucybdbld.jar, rather than the binary, ucybdbld.

An error appears when trying to run the Load:

java -jar ucybdbld.jar -B -X/home/UC4/Agents/oebs/OEBSAgent_deploy_file.jar
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:186)
        at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82)
        at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:112)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:186)
        at java.awt.Toolkit$2.run(Toolkit.java:849)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:841)
        at sun.swing.SwingUtilities2$AATextInfo.getAATextInfo(SwingUtilities2.java:126)


Cause

This only affects Linux/Unix environments.

Linux/Unix environment is not set correctly for 'headless' operation of Java Applications. There could be references to remote X11 Displays.


Resolution

For safe headless operation of Java application servers try the two options below:

  • -Djava.awt.headless=true
  • unset DISPLAY

The first option, "-Djava.awt.headless=true" is a Java system property. It is relatively well-known.

The shell command "unset DISPLAY" is not very well known. It removes any references to remote X11 displays, including ones that have been forwarded over ssh connections. This solves issues where application servers stop working as soon as you log off.