Unable to create patchObject" Inventory Corrupted - 12.1.0.2.170418 DBPSU
Patching is not an easy task, no matter how many times one successfully applied earlier. At the same time, regular patching is mandatory and standard procedure of every organization. I am discussing one of the bugs here encountered during my recent patching (QFSDP Apr 2018) on Exadata Database Machine, this also applies non-exadata RAC environment.
If you are planning to apply Apr 2018 PSU in an RAC environment, ensure OJVM patch is applied in rolling (-local) mode to avoid the following error:
Opatchauto Fails With Error "Unable to create patchObject" Inventory Corrupted
Here is the excerpt from MOD ID : 2286025.1:
Symptoms:
Applying patch 25434018 (Combo of 12.1.0.2.170418 OJVM PSU and 12.1.0.2.170418 GI PSU (Apr 2017)) in 2 Node RAC Cluster environment either using opatchauto or opatch without -local parameter.
- Node 1 was successful.
- Node 2 fails with below errors (java.lang.NullPointerException).
- Patch was applied using opatchauto method.
- Node 2 (opatchauto -analyze) fails with corrupt inventory for db home.
End of the patch, the following error is thorwn:
Following patches FAILED in analysis for apply:
Patch: /u01/oracle/home/oracle/dba/25434018/25434003/25171037
Log:
Reason: Failed during listing in Analysis: java.lang.Exception: oracle.opatch.opatchsdk.OPatchException: Unable to create patchObject
Possible causes are:
ORACLE_HOME/inventory/oneoffs/25171037 is corrupted. java.lang.NullPointerException
When opatch lsinventory/lspatches is issued on Node 2 home, the following error is shown:
Inventory load failed... OPatch cannot load inventory for the given Oracle Home.
LsInventorySession failed: Unable to create patchObject
Possible causes are:
ORACLE_HOME/inventory/oneoffs/25171037 is corrupted. PatchObject constructor: Input file "/u01/app/oracle/product/12.1.0/db_1/inventory/oneoffs/25171037/etc/config/actions" or "/u01/app/oracle/product/12.1.0/db_1/inventory/oneoffs/25171037/etc/config/inventory" does not exist.
OPatch failed with error code 73
At this point-in-time, OJVM is applied on node 1 and same is successfully propagated to another node oracle home.
But the overall patch shows the above errors and when lsinventory is executed on the node 2, the command also procedure the above said error.
To fix the issue, use the below workaround or apply the OJVM using opatch -local option:
- Restore Database home backup for Node 2.
- Validate "Opatch lsinventory" works without any errors on Node 2 Database Home.
- Validate opatch -analyze works on node 2 for Grid and DB PSU patch that is part of Combo (25434018).
- Apply the Grid and DB PSU using opatchauto to Node 2.
- Apply the OJVM patch with -local option to Node 2