3 Patching an Existing WebLogic Server Installation

You can patch an existing WebLogic Server installation using either ZDT Patching or manually rolling update of your servers.

Use ZDT Patching only if your domain contains three or more nodes and all the servers that you want to patch are assigned to clusters.

Manually performing a rolling update of your servers results in no loss of service to your customers. Use this method to patch individual servers that are not part of a cluster or if the domain contains fewer than three nodes. See Using Zero Downtime Patching.

You can also check the list of patches that have already been applied to a WebLogic Server instance. See Obtaining a List of Applied Patches.

Using Zero Downtime Patching

As of WebLogic Server 12.2.1, you can use ZDT Patching to automate the process of applying individual patches, bundle patches or patch set updates to a WebLogic Server installation.

With ZDT patching, you can use the WLST or the WebLogic Server Administration Console to:

  • Create and patch a second Oracle Home.

  • Distribute the patched Oracle Home to all of your nodes.

  • Configure a patching workflow to update the desired servers in your domain.

Use a patching workflow to revert patches that you have previously applied to a WebLogic Server installation using ZDT Patching.

For more details about ZDT Patching, see Introduction to Zero Downtime Patching.

Note:

OPatchAutoFMW (installed in OPatch/auto/fmw directory) is deprecated and is automatically removed when you update to OPatch 13.9.4.2.2 or later.

Obtaining a List of Applied Patches

Oracle WebLogic Server provides the ability to display the list of patches that have been applied to a WebLogic Server instance. The patch list can be obtained from either of the following sources:

When you use one of the preceding sources, the following details are provided for each applied patch:

  • Associated bug number

  • Patch number

  • Date the patch was applied

  • Brief description

Using the weblogic.log.DisplayPatchInfo System Property

The weblogic.log.DisplayPatchInfo system property contains a log of all patches that have been applied to a WebLogic Server instance, and can be accessed by either of the following methods:

  • Specifying the -Dweblogic.log.DisplayPatchInfo=true JVM option in the command line that starts the server instance. As the server starts, the startup messages in stdout include the list of applied patches, and they are also retained in the server log file. Note that to minimize logging overhead during startup, the default value of this option is false.

  • Running the weblogic.version utility. This utility can obtain the patch list regardless of whether the -Dweblogic.log.DisplayPatchInfo=true startup option is used, and does not require the WebLogic Server instance to be starting or running.

The following example shows running the weblogic.version utility. This example includes specifying the classpath of the weblogic.jar file corresponding to the specific server instance whose patch list is to be displayed.

bash-4.1$ java -classpath wlserver/server/lib/weblogic.jar weblogic.version

WebLogic Server 12.2.1.1.0 Thu Jun  2 16:21:58 PDT 2016 1784838
24907328;20845986;Mon Mar 13 14:40:42 PDT 2017;WLS PATCH SET UPDATE 12.2.1.1.170117
19795066;19149348;Mon Mar 13 14:33:28 PDT 2017;One-off
18905788;18668039;Mon Mar 13 14:32:57 PDT 2017;One-off
19632480;19278519;Mon Mar 13 14:32:26 PDT 2017;One-off
19002423;18804275;Mon Mar 13 14:31:50 PDT 2017;One-off
19030178;19234068;Mon Mar 13 14:31:22 PDT 2017;One-off
19154304;19278518;Mon Mar 13 14:30:54 PDT 2017;One-off
 
Use 'weblogic.version -verbose' to get subsystem information
 
Use 'weblogic.utils.Versions' to get version information for all modules

Using the ServerRuntimeMBean.PatchList Attribute

The list of patches that have been applied to a WebLogic Server instance is also available from the ServerRuntimeMBean.PatchList attribute. The value of this attribute is independent of the weblogic.log.DisplayPatchInfo system property. You can access the ServerRuntimeMBean.PatchList attribute using any of the following clients:

Note:

To access the patch list from ServerRuntimeMBean, you must be an authenticated user whose identity can be mapped to the Admin role.

Regardless of the client that you use to obtain the patch information, each patch entry has the following format:

<BugNumber>;<PatchID>;<DateApplied>;<Description>

Example 3-1 Using WLST

The following example shows using WLST to connect to a server instance and obtain its list of applied patches:

wls:/offline> connect('username','password','t3://localhost:7001')
Connecting to t3://localhost:7001 with userid weblogic ...
Successfully connected to Admin Server "myserver" that belongs to domain "mydomain".
 
Warning: An insecure protocol was used to connect to the server.
To ensure on-the-wire security, the SSL port or Admin port should be used instead.
 
wls:/mydomain/serverConfig/> serverRuntime()
Location changed to serverRuntime tree.
 This is a read-only tree with ServerRuntimeMBean as the root.
For more help, use help('serverRuntime').
 
wls:/mydomain/serverRuntime/> print cmo.getPatchList()
array(java.lang.String,['24907328;20845986;Mon Mar 13 14:40:42 PDT 2017;WLS PATCH SET UPDATE 12.2.1.1.170117', '19795066;19149348;Mon Mar 13 14:33:28 PDT 2017;One-off', '18905788;18668039;Mon Mar 13 14:32:57 PDT 2017;One-off', '19632480;19278519;Mon Mar 13 14:32:26 PDT 2017;One-off', '19002423;18804275;Mon Mar 13 14:31:50 PDT 2017;One-off', '19030178;19234068;Mon Mar 13 14:31:22 PDT 2017;One-off', '19154304;19278518;Mon Mar 13 14:30:54 PDT 2017;One-off'])
wls:/mydomain/serverRuntime/> 

Example 3-2 Using the REST API

The following example shows using the REST API to return the patch list:

Request:
http://localhost:7001/management/weblogic/latest/serverRuntime?links=none&fields=name,patchList

Response: {
    "patchList": [
        "24907328;20845986;Mon Mar 13 14:40:42 PDT 2017;WLS PATCH SET UPDATE 12.2.1.1.170117",
        "19795066;19149348;Mon Mar 13 14:33:28 PDT 2017;One-off",
        "18905788;18668039;Mon Mar 13 14:32:57 PDT 2017;One-off",
        "19632480;19278519;Mon Mar 13 14:32:26 PDT 2017;One-off",
        "19002423;18804275;Mon Mar 13 14:31:50 PDT 2017;One-off",
        "19030178;19234068;Mon Mar 13 14:31:22 PDT 2017;One-off",
        "19154304;19278518;Mon Mar 13 14:30:54 PDT 2017;One-off"
    ],
    "name": "myserver"
}

Example 3-3 Using the WebLogic Server Administration Console

To use the WebLogic Server Administration Console:

  1. In the left pane of the Console, expand Environment and select Servers.

  2. Select the name of the server whose applied patch list you want to view.

  3. Select Configuration > General > Monitoring.

The list of applied patches is displayed beneath the field labeled Patch List.

Example 3-4 Using a JMX Client

Using a JMX application, you can access the applied patch list of a WebLogic Server instance by invoking the getPatchList method, as in the following example:

/**
 * @include-api for-public-api
 * Returns array of informational strings for installed patches. Each info string
 * is of the form: <bug-id>;<patch-id>;<date-applied>;<patch-description>
 * For example:
 * 24907328;20845986;Mon Mar 13 14:40:42 PDT 2017;WLS PATCH SET UPDATE 12.2.1.1.170117
 *
 * @return Array of informational strings for installed patches at a server.
 * @roleAllowed Monitor
 * @unharvestable
 */
public String[] getPatchList();