Troubleshooting problems with shared libraries on UNIX
When you install a native two-tier JDBC driver or set up
WebLogic as a webserver on UNIX, you install shared libraries
or shared objects (distributed with the WebLogic software)
on your system. This document discusses problems you
may encounter and suggests solutions for them.
After an application is linked with the shared versions of libraries
(.so or .sl extensions), at runtime those libraries must be
loaded into the application process. The loader looks for the
libraries in different locations. How the loader works differs across
the different flavors of UNIX. Here we discuss Solaris and HP-UX.
Solaris
To find out which dynamic libraries are being used by an executable
you can run the ldd command on
the application. If the output of this command indicates that
libraries are not found, then add the location of the
libraries to the LD_LIBRARY_PATH environment variable as follows (for
C or Bash shells):
# setenv LD_LIBRARY_PATH weblogic_directory/lib/solaris:$LD_LIBRARY_PATH
Once you have done this, ldd should no longer complain about missing libraries.
HP-UX
The shared library problem you are most likely to encounter after
installing WebLogic on an HP-UX system is incorrectly set file
permissions.
After installing WebLogic, ensure that the shared library
permissions are set correctly with the chmod command.
Here is an example to set the
correct permissions for HP-UX 11.0:
% cd weblogic_directory/lib/hpux11
% chmod 755 *.sl
(For HP-UX 10.0, just substitute hpux10 for hpux11.)
If you encounter problems loading shared libraries after you have set
the file permissions, there could be a problem locating the
libraries. First, make sure that the weblogic_directory/lib/hpux11 or weblogic_directory/lib/hpux10
is in the SHLIB_PATH environment variable:
% echo $SHLIB_PATH
If the directory is not listed, add it:
# setenv SHLIB__PATH weblogic_directory/lib/hpux11:$SHLIB_PATH
Alternatively, you can copy (or link) the .sl files from the WebLogic
distribution to a directory that is already in the SHLIB_PATH
variable.
If you still have problems, use the chatr command
to specify that the application should search directories in
the SHLIB_PATH environment variable. The +s enabled
option sets an application to search the SHLIB_PATH variable.
Here is an example of this command, run on the jdbcKona/Oracle shared library
for HP-UX 11.0:
# cd weblogic_directory/lib/hpux11
# chatr +s enable libweblogicoci33.sl
Check the chatr man page for more information
on this command.
