Running Opatch throws up org.xml.sax.SAXParseException: : XML-20108: (Fatal Error) Start of root element expected

Recently after applying multiple patches to a 10.1.2 oracle in EBS and then doing opatch lsinventory ,i received below error

Oracle Interim Patch Installer version
Copyright (c) 2015, Oracle Corporation. All rights reserved.

Oracle Home : /u11/app/oracle/product/10.1.2
Central Inventory : /var/opt/app/oraInventory
from : /u11/app/oracle/product/10.1.2/oraInst.loc
OPatch version :
OUI version :
Log file location : /u11/app/oracle/product/10.1.2/cfgtoollogs/opatch/opatch2015-01-18_12-16-38PM.log

org.xml.sax.SAXParseException: : XML-20108: (Fatal Error) Start of root element expected.
at oracle.xml.parser.v2.XMLError.flushErrorHandler(
at oracle.xml.parser.v2.XMLError.flushErrors1(
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(
at oracle.xml.parser.v2.XMLParser.parse(
at oracle.sysman.oii.oiii.OiiiOracleHomeInfoXMLReader.updateHomeProperties(
at oracle.sysman.oii.oiii.OiiiInstallInventory.updateOracleHomesProperties(
at oracle.sysman.oii.oiii.OiiiInstallInventory.updateOracleHomesProperties(
at oracle.sysman.oii.oiii.OiiiInstallInventory.readHomes(
at oracle.sysman.oii.oiii.OiiiInstallAreaControl.loadPartialInstallInv(
at oracle.sysman.oii.oiii.OiiiInstallAreaControl.initInstallInv(
at oracle.sysman.oii.oiii.OiiiInstallAreaControl.loadInstallInventory(
at oracle.sysman.oii.oiii.OiiiInstallAreaControl.initAreaControl(
at oracle.sysman.oii.oiii.OiiiInstallAreaControl.initAreaControl(
at oracle.sysman.oii.oiic.OiicStandardInventorySession.initSession(
at oracle.sysman.oii.oiic.OiicStandardInventorySession.initSession(
at oracle.sysman.oii.oiic.OiicStandardInventorySession.initSession(
at oracle.opatch.OUIInventorySession.initSession(
at oracle.opatch.OUISessionManager.setupSession(
at oracle.opatch.OUISessionManager.lockCentralInventory(
at oracle.opatch.OUISessionManager.instantiate(
at oracle.opatch.OUISessionManager.updateOPatchEnvironment(
at oracle.opatch.InventorySessionManager.updateOPatchEnvironment(
at oracle.opatch.OPatchSession.main(
at oracle.opatch.OPatch.main( matter which Oracle home was choosen the same error came up.

The central inventory is hosting many 10.1.2 and 10.1.3 Oracle home. We found many  metalink notes for this error.Some of them listed below

OPatch Is Failing With “org.xml.sax.SAXParseException” XML-20108: (Fatal Error) [ID 1365569.1]
Opatch command throws warning:org.xml.sax.SAXParseException: : XML-20108: (Fatal Error) Start of root element expected. [ID 1344580.1]

As per all of them,this error could be reported for any of these reasons

  1. if the opatch version does  matches the oracle home version.
  2. The permission of  $ORACLE_HOME/inventory/ContentsXML is not correct and it is not writable by oracle home user
  3. if $ORACLE_HOME/inventory/ContentsXML/<files> are corrupt.

All these looks good for the oracle home. But error was still coming.

We further found that if point 2 and point 3 are not good for any oracle home in central inventory,it will show this error,So we check all the oracle home in central inventory and found problem in one home. We corrected it and it resolved the issue.

Another way to solve this problem will be to create new central inventory for the oracle home ,Then this problem will not occurred


Hope you like this post.Please do comments