Tuesday, February 10, 2015

Inventory load failed... OPatch cannot load inventory for the given Oracle Home

While checking opatch status it returned with error
=====================================================
subhen_host:ORCL > ./opatch lsinventory
Invoking OPatch 10.2.0.2.0

Oracle interim Patch Installer version 10.2.0.2.0
Copyright (c) 2005, Oracle Corporation.  All rights reserved..


Oracle Home       : /dboracle/orabase/product/10.2.0
Central Inventory : /export/home/oracle/oraInventory
   from           : /var/opt/oracle/oraInst.loc
OPatch version    : 10.2.0.2.0
OUI version       : 10.2.0.2.0
OUI location      : /dboracle/orabase/product/10.2.0/oui
Log file location : /dboracle/orabase/product/10.2.0/cfgtoollogs/opatch/opatch-2015_Feb_05_10-24-57-GMT_Thu.log

java.lang.NullPointerException
        at oracle.sysman.oii.oiii.OiiiInstallSerializedReader.readHomes(OiiiInstallSerializedReader.java:104)
        at oracle.sysman.oii.oiii.OiiiInstallInventory.readHomes(OiiiInstallInventory.java:503)
        at oracle.sysman.oii.oiii.OiiiInstallAreaControl.loadPartialInstallInv(OiiiInstallAreaControl.java:653)
        at oracle.sysman.oii.oiii.OiiiInstallAreaControl.initInstallInv(OiiiInstallAreaControl.java:698)
        at oracle.sysman.oii.oiii.OiiiInstallAreaControl.loadInstallInventory(OiiiInstallAreaControl.java:565)
        at oracle.sysman.oii.oiii.OiiiInstallAreaControl.initAreaControl(OiiiInstallAreaControl.java:1780)
        at oracle.sysman.oii.oiii.OiiiInstallAreaControl.initAreaControl(OiiiInstallAreaControl.java:1733)
        at oracle.sysman.oii.oiic.OiicStandardInventorySession.initSession(OiicStandardInventorySession.java:283)
        at oracle.sysman.oii.oiic.OiicStandardInventorySession.initSession(OiicStandardInventorySession.java:230)
        at oracle.sysman.oii.oiic.OiicStandardInventorySession.initSession(OiicStandardInventorySession.java:179)
        at oracle.opatch.OUISessionManager.setupSession(OUISessionManager.java:141)
        at oracle.opatch.OUISessionManager.lockCentralInventory(OUISessionManager.java:258)
        at oracle.opatch.OUISessionManager.instantiate(OUISessionManager.java:78)
        at oracle.opatch.OUISessionManager.getInventorySession(OUISessionManager.java:559)
        at oracle.opatch.Locker.lock(Locker.java:348)
        at oracle.opatch.OracleHomeInventory.lock(OracleHomeInventory.java:1762)
        at oracle.opatch.OracleHomeInventory.createInventoryObj(OracleHomeInventory.java:2021)
        at oracle.opatch.OracleHomeInventory.getInstance(OracleHomeInventory.java:1026)
        at oracle.opatch.LsInventorySession.process(LsInventorySession.java:277)
        at oracle.opatch.OPatchSession.main(OPatchSession.java:896)
        at oracle.opatch.OPatch.main(OPatch.java:513)
List of Homes on this system:

Inventory load failed... OPatch cannot load inventory for the given Oracle Home.
Possible causes are:
   Oracle Home dir. path does not exist in Central Inventory
   Oracle Home is a symbolic link
   Oracle Home inventory is corrupted
LsInventory Session failed: OracleHomeInventory::load() gets null oracleHomeInfo

OPatch failed with error code 72

===============
resolving error
===============
--- take a backup of orainventory and recreate it by attaching home again
subhen_host:ORCL > mv oraInventory oraInventory_orig
subhen_host:ORCL > ls -ltr|grep -i oraInventory
drwxrwx---   6 oracle   dba          512 Dec  7  2012 oraInventory_orig
subhen_host:ORCL > cd /dboracle/orabase/product/10.2.0/oui/bin/
subhen_host:ORCL > cd /export/home/oracle/oraInventory_orig
subhen_host:ORCL > ls
Contents                 install.platform         oraInst.loc_1020         orainstRoot.sh           sessionContext.ser
ContentsXML              logs                     oraInstaller.properties  oui
subhen_host:ORCL > cd ContentsXML/
subhen_host:ORCL > ls
comps.xml      inventory.xml  libs.xml
subhen_host:ORCL > cat inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 2005 Oracle Corporation. All rights Reserved -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>10.2.0.1.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OraDb10g_home1" LOC="/dboracle/orabase/product/10.2.0" TYPE="O" IDX="1"/>
</HOME_LIST>
</INVENTORY>
subhen_host:ORCL >  cd /dboracle/orabase/product/10.2.0/oui/bin/
subhen_host:ORCL > ./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME="/dboracle/orabase/product/10.2.0" ORACLE_HOME_NAME="OraDb10g_home1"
Starting Oracle Universal Installer...

No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.

>>> Ignoring required pre-requisite failures. Continuing...

The inventory pointer is located at /var/opt/oracle/oraInst.loc
The inventory is located at /export/home/oracle/oraInventory
'AttachHome' was successful.
subhen_host:ORCL >
--checking the status again
subhen_host:ORCL > /dboracle/orabase/product/10.2.0/OPatch/opatch lsinventory
Invoking OPatch 10.2.0.2.0

Oracle interim Patch Installer version 10.2.0.2.0
Copyright (c) 2005, Oracle Corporation.  All rights reserved..


Oracle Home       : /dboracle/orabase/product/10.2.0
Central Inventory : /export/home/oracle/oraInventory
   from           : /dboracle/orabase/product/10.2.0/oraInst.loc
OPatch version    : 10.2.0.2.0
OUI version       : 10.2.0.2.0
OUI location      : /dboracle/orabase/product/10.2.0/oui
Log file location : /dboracle/orabase/product/10.2.0/cfgtoollogs/opatch/opatch-2015_Feb_05_10-46-40-GMT_Thu.log

Lsinventory Output file location : /dboracle/orabase/product/10.2.0/cfgtoollogs/opatch/lsinv/lsinventory-2015_Feb_05_10-46-40-GMT_Thu.txt

--------------------------------------------------------------------------------
Installed Top-level Products (2):

Oracle Database 10g                                                  10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 1                            10.2.0.2.0
There are 2 products installed in this Oracle Home.


There are no Interim patches installed in this Oracle Home.

--------------------------------------------------------------------------------

OPatch succeeded.
subhen_host:ORCL > sleep 222222

No comments:

Post a Comment