在centOS上安装oracle出现java.lang.NoClassDefFoundError问题及解决方法

时间:2023-03-08 16:51:40

问题一:CentOS6.5 静默安装Oracle 11G过程中提示:Exception in thread "main" java.lang.NoClassDefFoundError .
在执行sh  ./database/runInstaller -silent -noconfig -responseFile  ./database/response/db_install.rsp时,提示:

$ Exception in thread "main" java.lang.NoClassDefFoundError

        at java.lang.Class.forName0(Native Method)

        at java.lang.Class.forName(Class.java:164)

        at java.awt.Toolkit$2.run(Toolkit.java:821)

        at java.security.AccessController.doPrivileged(Native Method)

        at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)

        at com.jgoodies.looks.LookUtils.isLowResolution(Unknown Source)

        at com.jgoodies.looks.LookUtils.<clinit>(Unknown Source)

        at com.jgoodies.looks.plastic.PlasticLookAndFeel.<clinit>(PlasticLookAndFeel.java:122)

        at java.lang.Class.forName0(Native Method)

        at java.lang.Class.forName(Class.java:242)

        at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1783)

        at javax.swing.UIManager.setLookAndFeel(UIManager.java:480)

        at oracle.install.commons.util.Application.startup(Application.java:758)

        at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:164)

        at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:181)

        at oracle.install.commons.base.driver.common.Installer.startup(Installer.java:265)

        at oracle.install.ivw.db.driver.DBInstaller.startup(DBInstaller.java:114)

        at oracle.install.ivw.db.driver.DBInstaller.main(DBInstaller.java:132)

  1 .用root用户在系统中设置了DISPLAY环境变量

  执行:unset DISPLAY     然后再执行runInstaller.sh,执行成功

  2.重新启动系统。以oracle的身份登录系统,然后执行./runInstaller

问题二:在centos系统安装oracle_x64_11gR2_database版本,在执行./runInstaller命令后,抛出"No protocol specified..Exception in thread "main" java.lang.NoClassDefFoundError.."异常

  1. 切换root账号

  2.执行命令xhost +,如下所示

  [root@xoms database]# xhost +
    access control disabled, clients can connect from any host
问题解决!