Blog dedicated to Oracle Applications (E-Business Suite) Technology; covers Apps Architecture, Administration and third party bolt-ons to Apps

Wednesday, February 18, 2009

LsInventorySession failed: Unable to create patchObject

Srinivas reported this error today:

opatch lsinventory showed this error at the end:

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

LsInventorySession failed: Unable to create patchObject

OPatch failed with error code 73

Metalink note 751152.1 suggested a few things but we didn't want to reclone the Oracle home. So we enabled debug mode:

export OPATCH_DEBUG=TRUE

And found that:

PatchObject::PatchObject looks for the actions file $ORACLE_HOME/inventory/oneoffs/5587976/etc/config/actions.xml
PatchObject::PatchObject looks for the inventory file $ORACLE_HOME/inventory/oneoffs/5587976/etc/config/inventory.xml
parserXMLFile : start
parserXMLFile : start
PatchObject(oracleHomePath,patchID)
PatchObject::PatchObject looks for the actions file $ORACLE_HOME/inventory/oneoffs/5648872/etc/config/actions.xml
PatchObject::PatchObject looks for the inventory file $ORACLE_HOME/inventory/oneoffs/5648872/etc/config/inventory.xml
PatchObject::PatchObject now looks for the actions file $ORACLE_HOME/inventory/oneoffs/5648872/etc/config/actions
PatchObject::PatchObject now looks for the inventory file $ORACLE_HOME/inventory/oneoffs/5648872/etc/config/inventory
Loading the information from inventory/filemap.


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

Locker::release()
OUISessionManager::unRegister()
Un-Registering the caller : OPatch
LsInventory::getInstance() returns
LsInventorySession failed: Unable to create patchObject
Cleaning up the directory : "$ORACLE_HOME/.patch_storage/patch_unzip"...

OPatch failed with error code 73

From the above output, it was clear that opatch was unable to find patch 5648872 in $ORACLE_HOME/inventory/oneoffs directory. So I compared the contents of $ORACLE_HOME/inventory/ContentsXML/comps.xml file in this instance and production:

In this instance:
$ cd $ORACLE_HOME/inventory/ContentsXML
$ grep 5648872 *
$ grep 5648872 comps.xml

5648872

In Production:
$ cd $ORACLE_HOME/inventory/ContentsXML
$ grep 5648872 *
comps.xml: 5648872

The lines



were extra in this instance.

Instead of manually editing the lines, I ftped the $ORACLE_HOME/inventory/ContentsXML/comps.xml file from Production and globally replaced the instance name in the file. Replacing the comps.xml file with this changed file from Production, resolved the issue.

We got this issue again after two months in a different instance. We checked metalink note 793600.1 which references Bug 7624037 A ROLLING PATCH UPGRADE ON TOP OF 10.2.0.4 CORRUPTS INVENTORY ON REMOTE NODES.

Even though our instance is not a RAC instance, we followed the advice and copied the $ORACLE_HOME/inventory/oneoffs directory from Production instance along with $ORACLE_HOME/inventory/ContentsXML/comps.xml file.

In comps.xml, we did a global replace of ORACLE_HOME path to point to development path instead of production path.

After this opatch succeeded.

Hope they fix the bug soon. Currently the patch suggested for the bug 7364519 (86 MB size) is password protected which means Oracle hasn't regression tested it yet.

Will update this post as I learn more.

4 comments:

Swarup said...

Thank you very much sir, i had the same issue from past 2 weeks, nothing worked.I did what you posted and it worked

Thank You

Mehboob said...

Awesome, i followed this and corrected 6 ORACLE_HOME.

amit said...

Vikram,

We have the same isssue in both PROD and Clone instance:


OracleHomeInventory::load() begins to process raw data from OUI to build up OPatch primitive classes
PatchObject(oracleHomePath,patchID)
PatchObject::PatchObject looks for the actions file /eb_rdo0_p/orabin/pnoltpdb/10.2/inventory/oneoffs/5605370/etc/config/actions.xml
PatchObject::PatchObject looks for the inventory file /eb_rdo0_p/orabin/pnoltpdb/10.2/inventory/oneoffs/5605370/etc/config/inventory.xml
PatchObject::PatchObject now looks for the actions file /eb_rdo0_p/orabin/pnoltpdb/10.2/inventory/oneoffs/5605370/etc/config/actions
PatchObject::PatchObject now looks for the inventory file /eb_rdo0_p/orabin/pnoltpdb/10.2/inventory/oneoffs/5605370/etc/config/inventory
Loading the information from inventory/filemap.


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

Locker::release()
OUISessionManager::unRegister()
Un-Registering the caller : OPatch
LsInventory::getInstance() returns
LsInventorySession failed: Unable to create patchObject
Cleaning up the directory : "/eb_rdo0_p/orabin/pnoltpdb/10.2/.patch_storage/patch_unzip"...

OPatch failed with error code 73
cuxsdb02:oracle [/eb_rdo0_p/orabin/pnoltpdb/10.2/OPatch] cd $ORACLE_HOME/inventory/ContentsXML
cuxsdb02:oracle [/eb_rdo0_p/orabin/pnoltpdb/10.2/inventory/ContentsXML] grep 5605370 *
comps.xml:
comps.xml: 5605370
cuxsdb02:oracle [/eb_rdo0_p/orabin/pnoltpdb/10.2/inventory/ContentsXML]

Please suggest how to proceed from here.

Regards,
Amit Garg

Anonymous said...

Very nice! One of your previous GE colleague was telling me that you are very kind and helpful. And for sure your blog also shows it. Thanks for sharing :)