Thursday, July 12, 2012

oraenv returns XPointer evaluation failed: no locset

Using the oraanv script and getting "XPointer evaluation failed: no locset"?

Well I have a potential solution. There are a couple of causes of this error that I know of.

One is a bug - using oranev from an agent home.
It's not supported - it has to be from a database home. See 
"Running oraenv from the Grid Control Agent Oracle Home Fails [ID 1323684.1]"
"The oraenv is not meant to be run from the Grid Control Agent ORACLE_HOME.This was diagnosed in BUG 10227734. The BUG will remove the oraenv from future agent installs....
Do not run oraenv to set the environment for the Grid Control Agent.Set the environment manually or using .sh script."
See the note for full details.

What if you are not using an agent home? 

Then the other cause I am aware of is this-

The oraenv script sets ORACLE_BASE. If it is not already set in the environment it calls a binary $ORACLE_HOME/bin/orabase.

orabase returns the ORACLE_BASE by looking in the Oracle Home's Inventory. It looks for the value in the file 

This file it seems can sometimes lose the value of the Oracle Base, and if it does then orabase returns the XPointer evaluation failed: no locset error.

The file contents should look much like this:

      <PROPERTY NAME="ORACLE_BASE" VAL="/ora/oracle"/> 

If the PROPERTY_LIST bit is missing, then you need to add it back in.
Set VAL= to be your Oracle Base - the example above is specific to MY environment.


  1. I found that if I had my current OH set to an OMS or Agent home and wanted to use "oraenv" to change to a valid client or DB home I could unset ORACLE_BASE prior to running oraenv and it would properly set the ORACLE_BASE.

    Executable ($ORACLE_HOME/bin/orabase)is called from oraenv and seems to be playing a role in this bug. It seems like fixing that would be a better solution than not including oraenv in future OMS or Agent installs, which is what the bug suggested would be done to "fix" the problem.