Opatch java.lang.UnsatisfiedLinkError: no oraInstaller in java.library.path wrong ELF class: ELFCLASS64

I got this error when trying to deploy an interim patch for soa installation using opatch on Solaris.

oracle@xxxxxxx:[/u01/app/oracle/product/11.1.1.5/ofm1/fms/soa/patch_top/13683187]# opatch apply
Invoking OPatch 11.1.0.8.3
java.lang.UnsatisfiedLinkError: /u01/app/oracle/product/11.1.1.5/ofm1/fms/soa/oui/lib/solaris/liboraInstaller.so: ld.so.1: java: fatal: /u01/app/oracle/product/11.1.1.5/ofm1/fms/soa/oui/lib/solaris/liboraInstaller.so: wrong ELF class: ELFCLASS64
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647)
        at java.lang.Runtime.load0(Runtime.java:769)
        at java.lang.System.load(System.java:968)
        at oracle.sysman.oii.oiip.osd.unix.OiipuUnixOps.loadNativeLib(OiipuUnixOps.java:402)
        at oracle.sysman.oii.oiip.osd.unix.OiipuUnixOps.(OiipuUnixOps.java:125)
        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:740)
        at oracle.opatch.OPatch.main(OPatch.java:445)
Exception in thread "main" java.lang.UnsatisfiedLinkError: no oraInstaller in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
        at java.lang.Runtime.loadLibrary0(Runtime.java:822)
        at java.lang.System.loadLibrary(System.java:993)
        at oracle.sysman.oii.oiip.osd.unix.OiipuUnixOps.loadNativeLib(OiipuUnixOps.java:420)
        at oracle.sysman.oii.oiip.osd.unix.OiipuUnixOps.(OiipuUnixOps.java:125)
        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:740)
        at oracle.opatch.OPatch.main(OPatch.java:445)

OPatch failed with error code 1

Oracle support has one article related to this, but think the solution there is not applicable to all instances.
The above error indicates that the opatch has encountered a 64 bit library while it was expecting a 32 bit, that means opatch was started as a 32 bit jvm. The java installation in the solaris box had both 32 bit and 64 bit jvms. So by default OPatch was starting as a 32 bit jvm , while the soa installation/ora installer on the ORACLE_HOME was 64 bits. The fix for this is to update the opatch script to add the “-d64” flag so that opatch starts as a 64 bit jvm.

$JAVA -d64 $JAVA_VM_OPTION $JRE_MEMORY_OPTIONS -cp $BASE/ocm/lib/emocmutl.jar:$BASE/ocm/lib/emocmclnt.jar:$CP/OraInstaller.jar:$CP/OraPrereq.jar:$CP/share.jar:$CP/srvm.jar:$CP/orai18n-mapping.jar:$CP/xmlparserv2.jar:$BASE/jlib/opatch.jar:$BASE/jlib/opatchutil.jar:$BASE/jlib/opatchprereq.jar:$BASE/jlib/opatchactions.jar:$BASE/jlib/opatchext.jar:$BASE/jlib/opatchfmw.jar:$WEBLOGIC_CLASSPATH -DOPatch.ORACLE_HOME=$OH -DOPatch.DEBUG=$DEBUGVAL -DOPatch.RUNNING_DIR=$BASE -DOPatch.MW_HOME=$MWH -DOPatch.WL_HOME=$WL_HOME -DOPatch.COMMON_COMPONENTS_HOME=$COMMON_COMPONENTS_HOME ${oracleOcmService} ${_bootClassPath} oracle/opatch/OPatch $@ 
Advertisements

About atheek

I am a Weblogic consultant working in Middleware/Integration area.
This entry was posted in OPatch and tagged . Bookmark the permalink.

One Response to Opatch java.lang.UnsatisfiedLinkError: no oraInstaller in java.library.path wrong ELF class: ELFCLASS64

  1. Mahi says:

    One more possible cause of Unsatisfied linked error in linux is incorrect LD_LIBRARY_PATH, if .so files are not there you may get this error. see http://javarevisited.blogspot.sg/2012/03/javalangunsatisfiedlinkerror-no-dll-in.html for more details

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s