Search This Blog

Monday, January 13, 2014

Opatch fails with the error java.lang.UnsatisfiedLinkError: Can't load library ../oui/lib/linux/liboraInstaller.so

 

OPatch giving an error on 64 bit linux with 64 bit JDK
java.lang.UnsatisfiedLinkError: Can't load library: /fmw11g/fmw1116/Middleware/oracle_common/oui/lib/linux/liboraInstaller.so
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1706)
        at java.lang.Runtime.load0(Runtime.java:770)
        at java.lang.System.load(System.java:1004)
        at oracle.sysman.oii.oiip.osd.unix.OiipuUnixOps.loadNativeLib(OiipuUnixOps.java:402)
        at oracle.sysman.oii.oiip.osd.unix.OiipuUnixOps.<clinit>(OiipuUnixOps.java:126)
        at oracle.sysman.oii.oiip.oiipg.OiipgEnvironment.ssgetUidux(OiipgEnvironment.java:528)
        at oracle.sysman.oii.oiix.OiixEnvironmentOps.ssgetUidux(OiixEnvironmentOps.java:159)
        at oracle.opatch.OUIReplacer.isRootAccess(OUIReplacer.java:741)
        at oracle.opatch.OPatch.main(OPatch.java:513)
Exception in thread "Main Thread" java.lang.UnsatisfiedLinkError: no oraInstaller in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1738)
        at java.lang.Runtime.loadLibrary0(Runtime.java:823)
        at java.lang.System.loadLibrary(System.java:1029)
        at oracle.sysman.oii.oiip.osd.unix.OiipuUnixOps.loadNativeLib(OiipuUnixOps.java:420)
        at oracle.sysman.oii.oiip.osd.unix.OiipuUnixOps.<clinit>(OiipuUnixOps.java:126)
        at oracle.sysman.oii.oiip.oiipg.OiipgEnvironment.ssgetUidux(OiipgEnvironment.java:528)
        at oracle.sysman.oii.oiix.OiixEnvironmentOps.ssgetUidux(OiixEnvironmentOps.java:159)
        at oracle.opatch.OUIReplacer.isRootAccess(OUIReplacer.java:741)
        at oracle.opatch.OPatch.main(OPatch.java:513)
Modify the file
/fmw11g/fmw1116/Middleware/wlserver_10.3/common/bin/commEnv.sh
and Change the
SUN_ARCH_DATA_MODEL="64"
JAVA_USE_64BIT=true
JAVA_HOME variable to /home/oracle/jdk1.6.0_45_64  and
JAVA_VENDOR variable to Sun.
for example ,
# Setup SUN_ARCH_DATA_MODEL
SUN_ARCH_DATA_MODEL="64"
#JAVA_USE_64BIT, true if JVM uses 64 bit operations
JAVA_USE_64BIT=true
# Reset JAVA_HOME, JAVA_VENDOR and PRODUCTION_MODE unless JAVA_HOME
# and JAVA_VENDOR are pre-defined.
if [ -z "${JAVA_HOME}" -o -z "${JAVA_VENDOR}" ]; then
  # Set up JAVA HOME
  JAVA_HOME="/home/oracle/jdk1.6.0_45_64"
  # Set up JAVA VENDOR, possible values are
  #Oracle, HP, IBM, Sun ...
  JAVA_VENDOR=Sun
  # PRODUCTION_MODE, default to the development mode
  PRODUCTION_MODE=""
fi

https://blogs.oracle.com/fmwinstallproactive/entry/which_jdk_is_my_fmw

No comments: