dbca java.lang.NullPointerException解決方法

wenhual43發表於2013-09-08
開始以為是/etc/hosts 配置的問題,改了還是有問題,根據網上說的
$ORACLE_HOME/network/admin/listener.ora,一看,還真是,HOST沒有,PORT=NULL,改過來,圖形介面終於彈出來了。記住這問題,下次遇到就會解決了。
轉載自:http://qy02101.blog.163.com/blog/static/1432740562010521113642992/

$ dbca
Exception in thread "main" java.lang.NullPointerException
at oracle.sysman.assistants.util.NetworkUtils.getOneLocalListenerProtocolAddress(NetworkUtils.java:1897)
at oracle.sysman.assistants.util.NetworkUtils.getOneLocalListenerProtocolAddress(NetworkUtils.java:1962)
at oracle.sysman.assistants.util.NetworkUtils.getOneLocalListenerProtocolAddress(NetworkUtils.java:1954)
at oracle.sysman.assistants.util.NetworkUtils.getOneLocalListenerProtocolAddress(NetworkUtils.java:1946)
at oracle.sysman.assistants.util.NetworkUtils.getOneLocalListenerProtocolAddress(NetworkUtils.java:1863)
at oracle.sysman.assistants.util.NetworkUtils.getLocalListenerAddress(NetworkUtils.java:736)
at oracle.sysman.assistants.util.NetworkUtils.getLocalListenerAddresses(NetworkUtils.java:774)
at oracle.sysman.assistants.util.NetworkUtils.needLocalListener(NetworkUtils.java:712)
at oracle.sysman.assistants.util.step.StepContext.setListenersToUpdate(StepContext.java:485)
at oracle.sysman.assistants.util.step.StepContext.(StepContext.java:139)
at oracle.sysman.assistants.dbca.backend.Host.(Host.java:454)
at oracle.sysman.assistants.dbca.ui.UIHost.(UIHost.java:185)
at oracle.sysman.assistants.dbca.ui.InteractiveHost.(InteractiveHost.java:54)
at oracle.sysman.assistants.dbca.Dbca.getHost(Dbca.java:141)
at oracle.sysman.assistants.dbca.Dbca.execute(Dbca.java:85)
at oracle.sysman.assistants.dbca.Dbca.main(Dbca.java:161)

解決
#vi $ORACLE_HOME/network/admin/listener.ora
在上面錯誤的情況下
會丟失
就會報上面的NullPointerException

改正後的格式如下
# LISTENER.ORA Network Configuration File: /opt/oracle/product/9.2.0/network/adm
in/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.28.176.58)(PORT = 1521))
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/oracle/product/9.2.0)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = homecc)
(ORACLE_HOME = /opt/oracle/product/9.2.0)
(SID_NAME = homecc)
)
)

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25027760/viewspace-772366/,如需轉載,請註明出處,否則將追究法律責任。

相關文章