Tuesday, 24 December 2013

UnsatisfiedLinkError exception loading native library: njni11 libnjni11.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)


In the process of R12.2 upgrade Generating database context file (adbldxml.pl) and running autoconfig (adautocfg.sh) throw java error.

Database 11g(11.2.0.3.0)
R12 12.2(Upgrading) 



bash-3.2$ perl adbldxml.pl


Starting context file generation for db tier..
Using JVM from /u01/oracle/ERP/db/tech_st/11.2.0/appsutil/jre/bin/java to execute java programs..
APPS Password:


The log file for this adbldxml session is located at:
/u01/oracle/ERP/db/tech_st/11.2.0/appsutil/log/adbldxml_11201201.log
UnsatisfiedLinkError exception loading native library: njni11
java.lang.UnsatisfiedLinkError: /u01/oracle/ERP/db/tech_st/11.2.0/lib/libnjni11.so: /u01/oracle/ERP/db/tech_st/11.2.0/lib/libnjni11.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)


Could not Connect to the Database with the above parameters, Please answer the Questions below



Enter Hostname of Database server:xxxx


Enter Port of Database server: 1521


Enter SID of Database server: xx


Enter Database Service Name: xx


Enter the value for Display Variable: xxxx:0.0


Context File  /u01/oracle/xxx/db/tech_st/11.2.0/appsutil/xxxxxxx.xml

already exists.


Overwriting Context File may cause loss of existing settings, hence
backing it up as: /u01/oracle/xxxx/db/tech_st/11.2.0/appsutil/xxxxx.xml.bak



The context file has been created at:
 /u01/oracle/xxx/db/tech_st/11.2.0/appsutil/xxxxxxx.xml


Even with the above errors it continues and creates context file (With the error it prompts few more values)
   
Autoconfig Error.


$ORACLE_HOME/appsutil/bin/adconfig.sh contextfile=/u01/oracle/ERP/db/tech_st/11.2.0/appsutil/xxx.xml

AutoConfig will consider the custom templates if present.
Using ORACLE_HOME location : /u01/oracle/ERP/db/tech_st/11.2.0
Classpath                   : :/u01/oracle/ERP/db/tech_st/11.2.0/jdbc/lib/ojdbc6.jar:/u01/oracle/ERP/db/tech_st/11.2.0/appsutil/java/xmlparserv2.jar:/u01/oracle/ERP/db/tech_st/11.2.0/appsutil/java:/u01/oracle/ERP/db/tech_st/11.2.0/jlib/netcfg.jar:/u01/oracle/ERP/db/tech_st/11.2.0/jlib/ldapjclnt11.jar

Using Context file          : /u01/oracle/ERP/db/tech_st/11.2.0/appsutil/xxx.xml



Context Value Management will now update the Context file
UnsatisfiedLinkError exception loading native library: njni11
java.lang.UnsatisfiedLinkError: /u01/oracle/ERP/db/tech_st/11.2.0/lib/libnjni11.so: /u01/oracle/ERP/db/tech_st/11.2.0/lib/libnjni11.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)



Root cause of the issue is 32 bit java , the program actually expects 64bit java instead of 32 bit java at $ORACLE_HOME/jre

Found java 64 under /u01/oracle/R122/fs1/FMW_Home/Oracle_EBS-app1/jdk/jre/bin so copied to $ORACLE_HOME/appsutil/

cp /u01/oracle/R122/fs1/FMW_Home/Oracle_EBS-app1/jdk/jre -RH /u01/oracle/ERP/db/tech_st/11.2.0/appsutil/

./java -version
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02, mixed mode)

perl adbldxml.pl 


AFter copying the 64 bit jre to $ORACLE_HOME/appsutil/ location both adbldxml.pl and adautocfg.sh completed without errors.
 

No comments:

Post a Comment