Tuesday, May 24, 2011

java.lang.ClassLoader$NativeLibrary.load

You set out for a new Oracle installation. You patiently follow each and every step
of the "Checking the Software Requirements" section of the install manual to ensure
the host is ready from the software point of view to get Oracle binaries loaded.
You then desperately invoke the installer and just then something terribly goes
wrong that makes you feel disappointed. You see Java errors from the Oracle
Universal Installer (OUI) that makes you go crazy although you may have the most
updated Java version running on the host. The irony is, you are not even using a
telnet session instead you are directly logged into the Linux host to invoke the
OUI just as you would on a Windows host.



oel5> ./runInstaller
Starting Oracle Universal Installer...

Checking installer requirements...

Checking operating system version: must be redhat-3, SuSE-9, redhat-4, redhat-5, 
UnitedLinux-1.0, asianux-1 or asianux-2
                                      Passed


All installer requirements met.

Preparing to launch Oracle Universal Installer from 
/tmp/OraInstall2011-05-12_11-18-59PM. Please wait ...oel5> Exception in thread 
"main" java.lang.UnsatisfiedLinkError: /tmp/OraInstall2011-05-12_11-18-59PM
/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such 
file or directory
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(Unknown Source)
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.loadLibrary0(Unknown Source)
        at java.lang.System.loadLibrary(Unknown Source)
        at sun.security.action.LoadLibraryAction.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
        at sun.awt.DebugHelper.(Unknown Source)
        at java.awt.Component.(Unknown Source)
oel5> 



The issue is, a package named "libXp" is missing on your Linux host - installing
which would take care of these Java errors from the OUI. Load the host installation DVD, look for the libXp package and install it as root user. Now, try to invoke the
installer once again and it works just perfect.


[root@oel5 Server]# rpm -Uvh libXp-1.0.0-8.1.el5.i386.rpm
warning: libXp-1.0.0-8.1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...                ########################################### [100%]
   1:libXp                  ########################################### [100%]
[root@oel5 Server]# 

No comments: