In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the relevant knowledge of "how to solve the Exception in thread main problem in Oracle". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
This article is explained on the premise that CDE is installed correctly in the AIX operating system.
Run the dbca command on the server where Oracle is installed and report an error:
[oracle@stone_db ~] $dbca
Exception in thread "main"
[oracle@stone_db ~] $
[oracle@stone_db ~] $export DISPLAY=1921.68.1.210:0.0
[oracle@stone_db ~] $dbca
Exception in thread "main"
In fact, it is not only the execution of dbca that will report an error, but also the execution of commands that require a pop-up graphics window.
For the most part, we think it's the DISPLAY variable, but it's not always the case. Let's take a look at dbca's log log:
[oracle@stone_db scripts] $cd $ORACLE_HOME/cfgtoollogs/dbca
[oracle@stone_db dbca] $ls
Trace.log
[oracle@stone_db dbca] $cat trace.log
Java.lang.UnsatisfiedLinkError:/home/Oracle_app_10204/jdk/jre/lib/i386/libawt.so:
LibXp.so.6: cannot openshared object file: No such file or directory
At java.lang.ClassLoader$NativeLibrary.load (Native Method)
At java.lang.ClassLoader.loadLibrary0 (ClassLoader.java:1586)
At java.lang.ClassLoader.loadLibrary (ClassLoader.java:1503)
At java.lang.Runtime.loadLibrary0 (Runtime.java:788)
At java.lang.System.loadLibrary (System.java:834)
At sun.security.action.LoadLibraryAction.run (LoadLibraryAction.java:50)
At java.security.AccessController.doPrivileged (Native Method)
At sun.awt.NativeLibLoader.loadLibraries (NativeLibLoader.java:38)
Atsun.awt.DebugHelper. (DebugHelper.java:29)
At java.awt.Component. (Component.java:506)
At oracle.sysman.assistants.util.wizard.WizardObject. (WizardObject.java:64)
At oracle.sysman.assistants.dbca.ui.DBCAWizard. (DBCAWizard.java:425)
At oracle.sysman.assistants.dbca.ui.UIHost. (UIHost.java:214)
At oracle.sysman.assistants.dbca.ui.InteractiveHost. (InteractiveHost.java:54)
At oracle.sysman.assistants.dbca.Dbca.getHost (Dbca.java:160)
At oracle.sysman.assistants.dbca.Dbca.execute (Dbca.java:94)
At oracle.sysman.assistants.dbca.Dbca.main (Dbca.java:180)
The obvious reason is that the package is missing:
LibXp.so.6: cannot open shared object file:No such file or directory
Verify the package:
[oracle@stone_db dbca] $rpm-qa | grep libXp
LibXpm-devel-3.5.5-3
LibXpm-3.5.5-3
Install libXp:
[root@stone_db Server] # ll
-rwxrwSrwx 1 root root 22996 2007-07-26libXp-1.0.0-8.1.el5.i386.rpm
-rwxrwSrwx 1 root root 15262 2007-07-26libXp-devel-1.0.0-8.1.el5.i386.rpm
[root@stone_db Server] # rpm-ivh libXp*.rpm
Warning: libXp-1.0.0-8.1.el5.i386.rpm:Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... # [100%]
1:libXp # # [50%]
2:libXp-devel # # [100%]
[root@stone_db Server] # rpm-qa | grep libXp
LibXpm-devel-3.5.5-3
LibXp-1.0.0-8.1.el5
LibXpm-3.5.5-3
LibXp-devel-1.0.0-8.1.el5
Dbca executed successfully again:
[root@stone_db ~] # xhost +
Access control disabled, clients canconnect from any host
[root@stone_db ~] # su-oracle
[oracle@stone_db ~] $export DISPLAY=192.168.1.210:0.0
[oracle@stone_db ~] $dbca
Another situation is that there is no shortage of packages. Logging in directly with oracle users can execute dbca to open the graphics window smoothly. Log in to xshell with root and execute xhost +
Then switch su-oracle to change the identity of the user, as a result, the implementation of dbca can not open the graphics window.
Log in to CDE with root
Bash-3.2# xhost +
Access control disabled, clients can connect from any host
Bash-3.2# su-oracle
[oracle@aix275 ~] # dbca
DISPLAY not set.
Set DISPLAY environment variable, then re-run.
[oracle@aix275 ~] # who
Root tty0 Jul 08 06:32
Root pts/0 Jul 08 05:49 (192.168.1.210)
Oracle pts/1 Jul 08 05:56 (192.168.1.210)
Root pts/2 Jul 08 05:58 (192.168.1.210)
Root dtremote Jul 08 06:34 (192.168.1.210 0)
Root pts/3 Jul 08 06:34 (192.168.1.210 purl 0.0)
Root pts/4 Jul 08 00:53 (192.168.1.210)
[oracle@aix275 ~] # export DISPLAY=192.168.1.210:0.0
[oracle@aix275 ~] # dbca
Open the graphics window normally.
However, under xshell, performing the same steps does not open the graphics window.
Looking at the trace.log file, it is found that the DISPLAY variable is set incorrectly and cannot use 192.168.1.210 virtual 0.0.
[oracle@aix ~] # cat / database/product/10.2.0/db_1/cfgtoollogs/dbca/trace.log
Java.lang.InternalError: Can't connect to X11 window server using '192.168.1.210 as the
Value of the DISPLAY variable.
At sun.awt.X11GraphicsEnvironment.initDisplay (Native Method)
At sun.awt.X11GraphicsEnvironment. (X11GraphicsEnvironment.java:175)
At java.lang.Class.forName1 (Native Method)
At java.lang.Class.forName (Class.java:180)
At java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment
(GraphicsEnvironment.java:91)
At java.awt.Font.initializeFont (Font.java:333)
At java.awt.Font. (Font.java:368)
At oracle.ewt.lwAWT.LWComponent. (Unknown Source)
At oracle.sysman.assistants.util.wizard.WizardObject. (WizardObject.java:64)
At oracle.sysman.assistants.dbca.ui.DBCAWizard. (DBCAWizard.java:425)
At oracle.sysman.assistants.dbca.ui.UIHost. (UIHost.java:214)
At oracle.sysman.assistants.dbca.ui.InteractiveHost. (InteractiveHost.java:54)
At oracle.sysman.assistants.dbca.Dbca.getHost (Dbca.java:160)
At oracle.sysman.assistants.dbca.Dbca.execute (Dbca.java:94)
At oracle.sysman.assistants.dbca.Dbca.main (Dbca.java:180)
Later, open multiple graphics terminals and use the who command to view it.
[root@aix /] # who
Root tty0 Jul 08 06:32
Root pts/0 Jul 08 05:49 (192.168.1.210)
Oracle pts/1 Jul 08 05:56 (192.168.1.210)
Root pts/2 Jul 08 05:58 (192.168.1.210)
Root dtremote Jul 08 06:34 (192.168.1.210 purl 0)
Root pts/3 Jul 08 06:34 (192.168.1.210 purl 0.0)
Root dtremote Jul 08 00:53 (192.168.1.210 purl)
Oracle dtremote Jul 08 06:44 (192.168.1.210 2)
Oracle dtremote Jul 08 06:51 (192.168.1.210 3)
Through observation, it is not difficult to find a rule, that is, the first open graphics terminal is IP:0, in which the dbca pop-up graphics window is IP:0.0.
The second open graphics window occupies the terminal serial number IP:1, and the pop-up window that executes the dbca command inside is IP:1.0. The terminal that opens at the back is used as such a push number.
So the Xshell we open is actually a terminal, but it usually occupies a character terminal, and when we execute dbca, a graphics window pops up.
Therefore, at this time, it will also occupy a graphic terminal serial number, and after the above reasoning, it is easy to set the correct DISPLAY parameters in the Xshell terminal.
That is to say, let's see which graphics terminal we want to open, assuming n, then we set the
The value of the DISPLAY parameter is "Open the IP:n-1.0 of the computer where the terminal is located".
So in retrospect, why is there no problem when you log in directly with an oracle user, but when you log in with a root user and then su to the oracle user identity?
Now this report is wrong. In fact, it is very simple. No matter which user identity we use to log in to a terminal, we execute echo DISPLAY and find that a value is set by default.
It is localhost:n.0. When we switch user identities and then execute echo DISPLAY, we find that this value is missing. At this point, we need to set this value and specify.
Which terminal opens the graphics window.
Recall that the DISPLAY parameter set by online posts is IP:0.0, that is, it is set in the first graphics terminal that is opened, or when the drawing is not opened.
The situation set in the command line terminal at the time of the terminal.
This is the end of the content of "how to solve the Exception in thread main problem in Oracle". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.