Error Running Opatch: Can't locate object method "OS_ID" via package "LsInventory"
Applies to:
Portal - Version: 9.0.4.1
This problem can occur on any platform.
Symptoms
When attempting to run opatch lsInventory -detail, the following error occurs:
ERROR
./opatch lsinventory -detail
PERL5LIB=$ORACLE_HOME/perl/lib/5.6.1:./perl_modules; export PERL5LIB
/app/oracle/oh_as_904dmht/perl/bin/perl ./opatch.pl lsinventory -detail
Can't locate object method "OS_ID" via package "LsInventory" (perhaps you forgot to load
"LsInventory"?) at perl_modules/Command.pm line 621.
Steps To Reproduce:
1. Connect to the Midtier Server.
2. Set the ORACLE_HOME to the Midtier Home.
3. Run the opatch command as follows:
./opatch lsinventory -detail
Cause
This issue is reported in the following bug fixed in the latest release of opatch:
Bug 3159666 CAN'T LOCATE OBJECT METHOD "OS_ID" VIA PACKAGE "APPLY" AT COMMAND.PM LINE 621.
Solution
To implement the solution, please execute the following steps:
1. Download the latest version of OPatch from the following patch:
Patch 6880880 PLACEHOLDER FOR ALL RELEASES OF OPATCH
Latest opatch version is 1.0.0.0.58. It was re-released on June 6, 2008.
Portal patches should be installed from the Portal Midtier, so when downloading the Patch 6880880, select release 10.1.0.0.0 that is the version compatible with the Oracle Application Server Midtier.
2. Connect to the Midtier Server.
3. Set the environment:
* Set the ORACLE_HOME to the Midtier Home.
* Set the SHLIB_PATH variable:
export SHLIB_PATH=$ORACLE_HOME/lib32:$SHLIB_PATH
* Set the LD_LIBRARY_PATH variable:
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
4. Rename the current OPatch directory.
cd $ORACLE_HOME
mv OPatch OPatch_old
5. Unzip the patch 2617419 zip file under the Midtier ORACLE_HOME.
cd $ORACLE_HOME
unzip p2617419_10102_GENERIC.zip
This should create a new OPatch directory.
6. Run Opatch again:
cd $ORACLE_HOME/OPatch
./opatch lsinventory -detail
运行补丁产生的错误:不能通过包"LsInventory"定位对象方法"OS_ID"
应用:
Portal - Version: 9.0.4.1
该问题可能发生在任何平台
症状
在运行./opatch lsinventory -detail时会产生以下错误:
ERROR
./opatch lsinventory -detail
PERL5LIB=$ORACLE_HOME/perl/lib/5.6.1:./perl_modules; export PERL5LIB
/app/oracle/oh_as_904dmht/perl/bin/perl ./opatch.pl lsinventory -detail
Can't locate object method "OS_ID" via package "LsInventory" (perhaps you forgot to load
"LsInventory"?) at perl_modules/Command.pm line 621.
问题重现步骤:
1.连接Midtier服务器
2.设置ORACLE_HOME
3.运行以下命令:
./opatch lsinventory -detail
原因
该问题在最新发布的opatch的已经确定的bug中有提到
Bug 3159666 CAN'T LOCATE OBJECT METHOD "OS_ID" VIA PACKAGE "APPLY" AT COMMAND.PM LINE 621.
解决方案
执行以下步骤来解决:
1.在下面的补丁中下载最新版本的 OPatch
Patch 6880880 PLACEHOLDER FOR ALL RELEASES OF OPATCH
最新的版本是 1.0.0.0.58,发行于2008.6.6
在下载补丁时应该选择能够兼容Oracle 应用服务器 Midtier的版本
2.连接服务器Midtier
3. 设置环境:
* Set the ORACLE_HOME to the Midtier Home.
* Set the SHLIB_PATH variable:
export SHLIB_PATH=$ORACLE_HOME/lib32:$SHLIB_PATH
* Set the LD_LIBRARY_PATH variable:
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
4.重命名当前的 OPatch 目录
cd $ORACLE_HOME
mv OPatch OPatch_old
5. 在Midtier ORACLE_HOME下解压 patch 2617419 zip
cd $ORACLE_HOME
unzip p2617419_10102_GENERIC.zip
这会创建一个新的OPatch目录
6.再运行OPatch
cd $ORACLE_HOME/OPatch
./opatch lsinventory -detail