Showing posts with label clone. Show all posts
Showing posts with label clone. Show all posts

Friday, June 15, 2007

RDBMS CPU Patch 5901881 Gotcha

I recently ran across this issue while applying the RDBMS CPU patch (5901881) for version 10.2.0.2.

To start off with a little background information:
ORACLE_HOME - /opt/oracle/testdb/10.2.0
Operating System - HP-UX 11.11
Installation - cloned from another ORACLE_HOME

OPatch returned the following error to me while applying patch 5901881:
INFO:Running make for target libnmemso INFO:Start invoking 'make' at Thu May 24 11:23:09 EDT 2007Thu May 24 11:23:09 EDT 2007
INFO:Finish invoking 'make' at Thu May 24 11:23:09 EDT 2007
WARNING:OUI-67200:Make failed to invoke "/usr/ccs/bin/make -f ins_sysman.mk libnmemso ORACLE_HOME=/opt/oracle/testdb/10.2.0"....'ld: Can't find library: "java"

Well as it turns out since this ORACLE_HOME was cloned from another ORACLE_HOME, the file $ORACLE_HOME/sysman/lib/env_sysman.mk does not properly get updated with the new ORACLE_HOME information. You need to edit this file and update the variable JRE_LIB_DIR to your correct ORACLE_HOME.

Since this is a HP-UX environment, the information I am presenting is going to be specific to this platform.

Here is what the entry was prior to me correcting it and the new updated entry:
OLD - JRE_LIB_DIR=/opt/oracle/devdb/10.2.0/jdk/jre/lib/PA_RISC2.0
NEW - JRE_LIB_DIR=/opt/oracle/testdb/10.2.0/jdk/jre/lib/PA_RISC2.0

Once I made the correction, I was able to successfully run opatch apply again. The closest MetaLink note I found was Doc ID: 418557.1 "'/usr/bin/ld: cannot find -ljava' occurs while applying one off patch." For all practical purposes, you should not see this issue unless you are applying a patch that has to relink the libnmemso executable AND are patching a cloned ORACLE_HOME.

Brian Bent, Solution Architect, Solution Beacon