1. 程式人生 > >CentOS6.5 靜默安裝Oracle 11g過程中提示:Exception in thread “main” java.lang.NoClassDefFoundError

CentOS6.5 靜默安裝Oracle 11g過程中提示:Exception in thread “main” java.lang.NoClassDefFoundError

原來是系統中設定了DISPLAY環境變數,執行:

[[email protected] database]$ ./runInstaller  -silent -responseFile /usr/local/oracle/response/db_install.rsp  -ignorePrereq
正在啟動 Oracle Universal Installer...


檢查臨時空間: 必須大於 120 MB。   實際為 34078 MB    通過
檢查交換空間: 必須大於 150 MB。   實際為 3951 MB    通過
準備從以下地址啟動 Oracle Universal Installer /tmp/OraInstall2017-04-20_03-14-19PM. 請稍候...[

[email protected] database]$ 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 javax.swing.UIManager.initialize(UIManager.java:1262)
at javax.swing.UIManager.maybeInitialize(UIManager.java:1245)
at javax.swing.UIManager.getUI(UIManager.java:851)
at javax.swing.JPanel.updateUI(JPanel.java:104)
at javax.swing.JPanel.<init>(JPanel.java:64)
at javax.swing.JPanel.<init>(JPanel.java:87)
at javax.swing.JPanel.<init>(JPanel.java:95)
at oracle.sysman.oii.oiif.oiifo.OiifoOCMUI.<init>(OiifoOCMUI.java:125)
at oracle.sysman.oii.oiif.oiifo.OiifoOCMInterfaceManager.<init>(OiifoOCMInterfaceManager.java:79)
at oracle.sysman.oii.oiif.oiifo.OiifoOCMInterfaceManager.getInstance(OiifoOCMInterfaceManager.java:124)
at oracle.install.ivw.db.driver.DBInstaller.run(DBInstaller.java:123)
at oracle.install.commons.util.Application.startup(Application.java:869)
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)

原來是系統中設定了DISPLAY環境變數

執行:

unset DISPLAY

然後再執行runInstaller.sh,執行成功