Wednesday, 10 October 2018

libnjni12.so(), but a runtime definition of the symbol was not found

/oracle/app/oracle/product/12.1.0/dbhome_1/lib/libnjni12.so(), but a runtime definition of the symbol was not found.

libnjni12.so(), but a runtime definition of the symbol was not found


It was the time when I was trying to upgrade one of TEST database from 11g (11.2.0.4) to 12c (12.1.0.2) on IBM AIX Server. So the 11g database environment was already there and running. I started from installing the 12c software and then the upgrade process was meant to be done by DBUA which was supposed to be run from the new 12c ORACLE_HOME. So as soon as the Oracle 12c software got installed, I set the environment as shown below and tried to run the DBUA (database upgrade assistant),

$ export ORACLE_HOME=/oracle/app/oracle/product/12.1.0/dbhome_1/
$
$ ./dbua
UnsatisfiedLinkError exception loading native library: njni12
java.lang.UnsatisfiedLinkError: njni12 (rtld: 0712-001 Symbol CreateIoCompletionPort was referenced
      from module /oracle/app/oracle/product/12.1.0/dbhome_1/lib/libnjni12.so(), but a runtime definition
      of the symbol was not found.
rtld: 0712-001 Symbol GetMultipleCompletionStatus was referenced
      from module /oracle/app/oracle/product/12.1.0/dbhome_1/lib/libnjni12.so(), but a runtime definition
      of the symbol was not found.
rtld: 0712-002 fatal error: exiting.)
Exception in thread "main" java.lang.UnsatisfiedLinkError: oracle/net/common/NetGetEnv.get(Ljava/lang/String;)Ljava/lang/String;
        at oracle.net.config.Config.getNetDir(Unknown Source)
        at oracle.net.config.Config.initConfig(Unknown Source)
        at oracle.net.config.Config.<init>(Unknown Source)
        at oracle.sysman.assistants.util.NetworkUtils.<init>(NetworkUtils.java:298)
        at oracle.sysman.assistants.util.step.StepContext.<init>(StepContext.java:388)
        at oracle.sysman.assistants.dbma.backend.CompManager.<init>(CompManager.java:986)
        at oracle.sysman.assistants.dbma.wizard.view.WizardCompManager.<init>(WizardCompManager.java:95)
        at oracle.sysman.assistants.dbma.wizard.view.WizardCompManager.getInstance(WizardCompManager.java:112)
        at oracle.sysman.assistants.dbma.Dbma.getCompManager(Dbma.java:199)
        at oracle.sysman.assistants.dbma.Dbma.execute(Dbma.java:141)
        at oracle.sysman.assistants.dbma.Dbma.statusMain(Dbma.java:241)
        at oracle.sysman.assistants.dbma.Dbma.main(Dbma.java:225)
$

Above mentioned errors came after calling the DBUA. After some analysis, I came to know that the problem is with the linking of new Oracle Binaries which was not properly done at the time of software installation. This was because of IOCP module as it was not enabled on the server. To check the same, use the below mentioned command,

$ lsdev | grep iocp

The default value of the same module is "DEFINED" but you need to change it to "AVAILABLE" in order to fix things here.

Solution:

Enable the "IOCP" option and  Relink the Oracle Binaries.

You need to set the IOCP to "Available". To do the same,

Log in as root and run the following command:

# smitty iocp

Select Change / Show Characteristics of I/O Completion Ports.

Change configured state at system restart from "Defined" to "Available".

Run the lsdev command to confirm the IOCP status is set to "Available".

$ lsdev | grep iocp

iocp0 Available I/O Completion Ports

After this take the system restart to make changes permanent.

After restart, login with root and Relink the binaries using "relink all"

# relink all

and then calling root.sh inside ORACLE_HOME with root user.

# /oracle/app/oracle/product/12.1.0/dbhome_1/root.sh

After this, login with Oracle User (or any other user you have used to install Oracle 12c Software) and call DBUA.

$ export ORACLE_HOME=/oracle/app/oracle/product/12.1.0/dbhome_1/

$ ./dbua

The Database Upgrade Assistant will open without any trouble this time.

I hope this helps !!

No comments:

Post a comment