0

I have oracle database on RHEL. As a Oracle user when I try to initiate dbca, it is giving me error as following:

Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11.XToolkit
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:264)
        at java.awt.Toolkit$2.run(Toolkit.java:860)
        at java.awt.Toolkit$2.run(Toolkit.java:855)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:854)
        at com.jgoodies.looks.LookUtils.isLowResolution(LookUtils.java:484)
        at com.jgoodies.looks.LookUtils.<clinit>(LookUtils.java:249)
        at com.jgoodies.looks.plastic.PlasticLookAndFeel.<clinit>(PlasticLookAndFeel.java:135)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1879)
        at javax.swing.UIManager.setLookAndFeel(UIManager.java:582)
        at oracle.install.commons.util.Application.startup(Application.java:917)
        at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:181)
        at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:198)
        at oracle.assistants.common.base.driver.AssistantApplication.startup(AssistantApplication.java:320)
        at oracle.assistants.dbca.driver.DBConfigurator.startup(DBConfigurator.java:342)
        at oracle.assistants.dbca.driver.DBConfigurator.main(DBConfigurator.java:386)

I tried to set display variable but still getting the same error.

How to resolve this?

Thank you

Setting up a display variable

As a root user, changed xforward in sshd_config file.

1 Answers1

1

Based on this article.Below is the reason for the issue

  1. X Window system is not installed
  2. DISPLAY variable is not set
  3. The oracle user has not been added to the Access Control list

Resolution:-

X Window system is not installed

Confirm the xorg-x11-apps.x86_64 package is installed

DISPLAY variable is not set:-

If you connect to the server remotely, you need a terminal emulator. You also need to set the location where the GUI tools can display their output; you use the export display command for that. Run the following in the terminal:

su -l oracle

export DISPLAY=ip_address:display_number

The oracle user has not been added to the Access Control list:-

The oracle user must be allowed to run binaries that open GUIs, such as Oracle installation and Oracle Database Configuration Assistant (DBCA). Run the following in the terminal:

su -l root

xhost +SI:localuser:oracle

After completing the below verifications, log in to the oracle user and launch the Oracle Database Configuration Assistant (DBCA):

su -l oracle
$ORACLE_HOME/bin/netca
psaraj12
  • 4,772
  • 2
  • 21
  • 30