Home » Oracle » How to apply patches in Oracle weblogic in Linux & windows

How to apply patches in Oracle weblogic in Linux & windows

Here in this post we will see weblogic patching i.e how to apply patches applied in weblogic in 10.3.6 version , 12c (12.1.1  and 12.1.2 and later ).

how to apply patches in weblogic in 10.3.6 version and up to 12.1.1

Weblogic Smart Update utility (bsu)  is used to apply patches in 10.3.6 and 12.1.1 version of weblogic.

Weblogic Smart Update utility (bsu) lies in $MW_HOME/utils/bsu/

BSU Utility stands for BEA Smart update utility

Now how to apply patches in weblogic in 10.3.6
0. stop the weblogic server

1.First unzip  the patch to {MW_HOME}/utils/bsu/cache_dir

Note: You must make sure that the target directory for unzip has required write and executable permissions
for “user” with which the component being patched is installed.

Note down the patch ID by reading the read me

Description:
============
Oracle WebLogic Sever overlay patch for 10.3.6.0.190416 which requires WLS 10.3.6.0.190416 PSU (Patch Number: 29204678 , Patch ID :U5I2) in the environment

2.Navigate to the {MW_HOME}/utils/bsu directory.

For Unix/Linux

bsu.sh -install -patch_download_dir=${MW_HOME}/utils/bsu/cache_dir -patchlist=<id> -prod_dir=$MW_HOME\wlserver_10.3

for Windows

bsu.cmd -install -patch_download_dir=${MW_HOME}/utils/bsu/cache_dir -patchlist=<id> -prod_dir=$MW_HOME\wlserver_10.3
How to apply patches in Oracle weblogic in Linux & windows

3.If it gives any conflict with any patches already applied in the system , we can rollback the conflict the patch as below

For Unix/Linux

bsu.sh -remove -patchlist=<id> -prod_dir=$MW_HOME\wlserver_10.3

for Windows

bsu.cmd -remove -patchlist=<id> -prod_dir=$MW_HOME\wlserver_10.3

4.Once the patch is applied successfully, we can check for the applied patches using the below article

See also  Oracle tkprof utility

how to check patches applied in weblogic

5.If you receive below error while applying patches with BSU utility

Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2521)
at java.lang.Class.getMethod0(Class.java:2764)

Following steps can be used

Increase the heap size to allow more memory and prevent an eventual “java.lang.OutOfMemoryError: GC overhead limit exceeded” error:

Go to $WL_HOME/utils/bsu
Prepare to edit the bsu.sh (for UNIX) or bsu.cmd (for Windows)
Find the MEM_ARGS setting, e.g., the default as MEM_ARGS="-Xms256m -Xmx512m"
Increase these values to a higher setting, e.g., MEM_ARGS="-Xms1024m -Xmx1024m"

Ensure MEM_ARGS are used in bsu script for the patch-client.jar to resolve “java.lang.OutOfMemoryError: Java heap space” error:

Look for the line:
"$JAVA_HOME/bin/java" -jar patch-client.jar $*

Change to the following to ensure the MEM_ARGS are passed:
"$JAVA_HOME/bin/java" ${MEM_ARGS} -jar patch-client.jar $*

6.Start the weblogic Server

How to increase the patch application Performance

In case patch application is taking lot of time, we can do two things

1.We can upgrade to latest BEA Smart utility
Steps
a. Ensure you are on WebLogic Server 10.3.6

b. Ensure you have applied previously released Smart Update 3.3.0

Patch 12426828 SMARTUPDATE 3.3 INSTALLER PLACEHOLDER

This is for 10.3.6 even though it says 10.3.5, (which was when it was initially released)
When you launch BSU, it will display the version when it is loading. If the server has internet access, then you should be given the option to update Smart Update when you run the tool.
You may also run the following command:

%WL_HOME%\utils\bsu\bin\bsu.cmd -version (for Windows)
$WL_HOME/utils/bsu/bin/bsu/bsu.sh -version (for Unix/Linux)

2.Older PSU’s that are no longer in use may be deleted from the bsu cache_dir. This can further speed up some processing.

See also  Step by Step R12.2.12 EBS installation on Oracle Virtual Box

3.You can try increasing the memory foot print

Go to $FMW_Home/utils/bsu.
Edit bsu.sh (for UNIX) or bsu.cmd (for Windows).
Here you will find the following: MEM_ARGS=”-Xms256m -Xmx512m”
Increase these values as needed to 3 Gb or 4 Gb and additional GCOverheadLimit parameter: for example, to

"-Xms3072m -Xmx3072m -XX:-UseGCOverheadLimit" or "-Xms4098m -Xmx4098m -XX:-UseGCOverheadLimit"

how to apply weblogic patches in Weblogic 12.1.2 and later

BSU Utility is deprecated in 12.1.2 . We use opatch to patch the weblogic installation

On Unix/linux

cd $MW_HOME/OPatch
./opatch apply

On Windows:

cd %MW_HOME%/OPatch
opatch apply

How to Rollback patches from Weblogic in 10.3.6 version and up to 12.1.1

  1. Stop the web logic server
  2. Navigate to the {MW_HOME}/utils/bsu directory.
  3.  Rollback the patch using below commandFor Unix
    bsu.sh -remove -patchlist=<id> -prod_dir=$MW_HOME\wlserver_10.3 
    for Windows
    bsu.cmd -remove -patchlist=<id> -prod_dir=$MW_HOME\wlserver_10.3 

    4. Once the patch is applied successfully, we can check for the applied patches using the below article

    how to check patches applied in weblogic

    5.  Start the weblogic server

How to Rollback patches from Weblogic in 12.1.1 later

BSU Utility is deprecated in 12.1.2 . We use opatch to patch the weblogic installation

On Unix/Linux

cd $MW_HOME/OPatch
./opatch rollback -id 

On Windows:

cd %MW_HOME%/OPatch
opatch rollback -id

I hope you like this post on weblogic patching and these steps are helpful for your administration in weblogic server. Please do let me know if you find any difficulty on how to apply weblogic patch in Linux or applying patches in window

Related Articles

Weblogic Administration Console
Changing the Oracle WebLogic Server Administration User Password in R12.2
How to start/stop Node manager and Managed server in Weblogic
How to create the weblogic Domain
How to perform weblogic Installation

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top