Pages

Wednesday, September 18, 2013

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.




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


oracle@xxxxxxx:[/u01/app/oracle/product/11.1.1.5/ofm1/fms/soa/patch_top/13683187]# opatch apply

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 $@      

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