Pages

Friday, June 13, 2014

opatch not working to apply April PSU patch:17572728 in weblogic 12.1.2.0.0 : setHomeDirs.sh: No such file or directory

Component :  Weblogic 12c
version: 12.1.2.0.0

Whenever we try to apply PSU on weblogic 12c (12.1.2), we have to apply the patch under MW_HOME (middleware home) ex: /sid/fmw/product/12  as ORACLE_HOME.

Issue:
======

$ /sid/fmw/product/12/OPatch/opatch lsinventory -jdk $JAVA_HOME
/sid/fmw/product/12/oracle_common/common/bin/setHomeDirs.sh: line 16: /sid/fmw/product/12/utils/config/10.3/setHomeDirs.sh: No such file or directory

Solution
========
If the directory  /sid/fmw/product/12/utils/config/10.3 is not created , first create the directory

and copy the setHomeDirs.sh as below

cp /sid/fmw/product/12//inventory/Templates/oracle_common/common/bin/setHomeDirs.sh /sid/fmw/product/12/utils/config/10.3


Issue 2:
========

./opatch lsinventory -detail -jdk $JAVA_HOME

Exception in thread "main" java.lang.NoClassDefFoundError: com/oracle/cie/gdr/external/InventoryException
        at oracle.opatch.OPatch.main(OPatch.java:548)
Caused by: java.lang.ClassNotFoundException: com.oracle.cie.gdr.external.InventoryException
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        ... 1 more
       
 Solution
 ========

 This issue occurs mostly if you try to apply higher version of OPatch in the lower version home.
 In my case , Have got this issue because i tried to update my OPatch with 13.1.0.0 , but this is only supported for 11.1.0.9
 You can get the version by reverting to older version and check the opatch lsinventory -detail -jdk $JAVA_HOME

 Ex: 

 bash-4.1$ ./opatch lsinventory -detail -jdk $JAVA_HOME
 Oracle Interim Patch Installer version 11.1.0.9.0
 Copyright (c) 2011, Oracle Corporation.  All rights reserved.


 Oracle Home       : /sid/fmw/product/12/oracle_common
 Central Inventory : /sid/fmw/oraInventory
    from           : /sid/fmw/product/12/oracle_common/oraInst.loc
 OPatch version    : 11.1.0.9.0
 OUI version       : 11.1.0.9.0
 OUI location      : /sid/fmw/product/12/oracle_common/oui
 Log file location : /sid/fmw/product/12/oracle_common/cfgtoollogs/opatch/opatch2014-06-12_00-15-11AM_1.log

 Patch history file: /sid/fmw/product/12/oracle_common/cfgtoollogs/opatch/opatch_history.txt


 OPatch detects the Middleware Home as "/sid/fmw/product/12"

 Lsinventory Output file location : /sid/fmw/product/12/oracle_common/cfgtoollogs/opatch/lsinv/lsinventory2014-06-12_00-15-11AM.txt

 --------------------------------------------------------------------------------
 Installed Top-level Products (1):

 Oracle AS Common Toplevel Component                                  11.1.1.2.0
There are 1 products installed in this Oracle Home.