Yesterday I wanted to apply a brand new patch to customer’s Enterprise Manager 13cR2 OMS running on Linux. First I updated the OMSPatcher as described here: How to upgrade the 13.1 Cloud Control OMSPatcher to latest version of OMSPatcher (Doc ID 2135028.1). This update was easy. Download, transfer, unzip and copy the OMSPatcher files to the Enterprise Manager ORACLE_HOME directory.
Then the patch apply results in an error. OMSPatcher is based on OPatch, he needs an update too.
We need a new OPatch Version
This was error message for patch apply with omspatcher when I executed the apply command.
[Dec 1, 2016 10:17:38 AM] Prerequisite check "CheckMinimumOPatchVersion" failed. The details are: The OPatch being used has version 18.104.22.168.0 while the following patch(es) require higher versions: Patch 24914115 requires OPatch version 22.214.171.124.0. Please download latest OPatch from My Oracle Support.
My actual EM13cR2 OPatch version was 126.96.36.199.0.
oracle@kestenholz:/u00/app/oracle/product/em13cr2/OPatch/ [oms13cr2] ./opatch version OPatch Version: 188.8.131.52.0 OPatch succeeded.
Get the new Version
In My Oracle Support I found the newest version of OPatch, Download.
Transfer and extract
The next step was to extract and to transfer the package to the target server.And then I was wondering that not like in versions before an OPatch directory was created, now there is a JAR file inside the package. Copy & Paste of an OPatch directory is no more possible anymore.
oracle@kestenholz:/u00/app/oracle/stage/OPatch/ [oms13cr2] unzip p6880880_139000_Generic.zip Archive: p6880880_139000_Generic.zip creating: 6880880/ inflating: 6880880/README.txt inflating: 6880880/opatch_generic.jar inflating: 6880880/version.txt
Installation Routine – README.txt
Let’s take a look in the README.txt – there is an installation manual.
oracle@kestenholz:/u00/app/oracle/stage/OPatch/6880880/ [oms13cr2] cat README.txt Installation ---------------------------------- - Backup your <ORACLE_HOME> - Unzip this patch into your staging directory PATCH_HOME - Install the software via: java -jar <PATCH_HOME>/6880880/opatch_generic.jar -silent oracle_home=ORACLE_HOME - To validate the installation: cd <ORACLE_HOME>/OPatch opatch version opatch lspatches
Installation – 1st run – where is my JDK ?
oracle@kestenholz:~/ [oms13cr2] java -jar /u00/app/oracle/stage/6880880/opatch_generic.jar -silent oracle_home=/u00/app/oracle/roduct/em13cr2 Launcher log file is /tmp/OraInstall2016-12-02_10-00-10AM/launcher2016-12-02_10-00-10AM.log. Extracting the installer . . . . Done This installer must be executed using a Java Development Kit (JDK) but /usr/lib/jvm/java-1.8.0-openjdk-184.108.40.206-3.b17.el7.x86_64/jre is not a valid JDK Java Home. The log is located here: /tmp/OraInstall2016-12-02_10-00-10AM/launcher2016-12-02_10-00-10AM.log.
Installation – 2nd run – JRE is not good enough
I tried to use the existing JDK from my Oracle 12.1 installation
oracle@kestenholz:/u00/app/oracle/stage/6880880/ [oms13cr2] export JAVA_HOME=/u00/app/oracle/product/220.127.116.11/dbhome_1/jdk/bin oracle@kestenholz:/u00/app/oracle/stage/6880880/ [oms13cr2] $JAVA_HOME/java -jar /u00/app/oracle/stage/6880880/opatch_generic.jar -silent oracle_home=/u00/app/oracle/product/em13cr2 Exception in thread "main" java.lang.UnsupportedClassVersionError: com/oracle/cie/nextgen/launcher/Launcher : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) Could not find the main class: com.oracle.cie.nextgen.launcher.Launcher. Program will exit.
Installation – 3rd run – JDK 1.7 rocks
Now I have downloaded and configured JDK 1.7. Another try, and now it works. Here is a short summary of the output. In the background now the Oracle Universal Installer is started.
Thanks to Gokhan Atil – http://www.gokhanatil.com – for the second possibility, you can use the JDK from the OMS too.
oracle@kestenholz:~/ [oms13cr2] export JAVA_HOME=/u00/app/oracle/product/jdk1.7.0_79/bin oracle@kestenholz:~/ [oms13cr2] $JAVA_HOME/java -jar /u00/app/oracle/stage/6880880/opatch_generic.jar -silent oracle_home=/u00/app/oracle/product/em13cr2 Launcher log file is /tmp/OraInstall2016-12-02_10-05-14AM/launcher2016-12-02_10-05-14AM.log. Extracting the installer . . . . Done Checking if CPU speed is above 300 MHz. Actual 2793.546 MHz Passed Checking swap space: must be greater than 512 MB. Actual 2047 MB Passed Checking if this platform requires a 64-bit JVM. Actual 64 Passed (64-bit not required) Checking temp space: must be greater than 300 MB. Actual 37290 MB Passed Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2016-12-02_10-05-14AM Installation Summary Disk Space : Required 6 MB, Available 37,253 MB Feature Sets to Install: Next Generation Install Core 18.104.22.168.0 OPatch 22.214.171.124.0 OPatch Auto OPlan 126.96.36.199.0 Session log file is /tmp/OraInstall2016-12-02_10-05-14AM/install2016-12-02_10-05-14AM.log Loading products list. Please wait. 1% 40% Loading products. Please wait. 43% 46% ... 99% Updating Libraries Starting Installations 1% 2% 3% ... 91% 92% Install pending Installation in progress Component : oracle.swd.opatch 188.8.131.52.0 Copying files for 'oracle.swd.opatch 184.108.40.206.0 ' Component : oracle.glcm.osys.core 220.127.116.11.0 ... Feature Set : oracle.glcm.opatchauto.core.actions.classpath Post Feature installing 'oracle.glcm.opatchauto.core.actions.classpath' Post feature install complete String substitutions pending ... Setting up 'oracle.glcm.opatchauto.core 18.104.22.168.0 ' Setup successful Save inventory pending Saving inventory 93% Saving inventory complete 94% Configuration complete Logs successfully copied to /u00/app/oraInventory/logs.
Now the version was ok, the patch could be applied.
oracle@kestenholz:/u00/app/oracle/product/em13cr2/OPatch/ [oms13cr2] ./opatch version OPatch Version: 22.214.171.124.0 OPatch succeeded.
Additional Information: If the installer does not find your inventory location (was happened to me on an AIX system), just execute the install command with the parameter -invPtrLoc.
java -jar /u00/app/oracle/stage/6880880/opatch_generic.jar -silent oracle_home=/u00/app/oracle/product/oms13cr2 -invPtrLoc /etc/oraInst.loc
The OMSPatcher can be updated like before, but the other important component in the patch process OPatch has has to be installed. From my point of view this is a step back, I don’t know what was the idea behind to change it. Now you have to be sure, that there is an existing JDK 1.7 available on your system. This means that applying a patch on the express way is not possible anymore, you have to fulfill the prerequisite before you have an actual OPatch. And at the moment, there is no other documentation than the README.txt available, the hint with the inventory parameter came from My Oracle Support after I opened a SR.
Say good-bye to Unzip, Copy & Paste.