OutOfMemoryError when running bsu.sh

I was trying to apply a CPU (Critical Patch Update) on an older version of Oracle WebLogic Server, namely 11g (10.3.6). This is done through the bsu utility.

I received the following OutOfMemory exception when trying to apply the patch:

oracle@weblogicdev:/u01/oracle/middleware/utils/bsu> ./bsu.sh -install -patch_download_dir=/u01/oracle/middleware/utils/bsu/cache_dir -patchlist=FMJJ -prod_dir=/u01/oracle/middleware/wlserver_10.3
Exception in thread "Main Thread" Exception in thread "Thread-0" java.lang.OutOfMemoryError
java.lang.NoClassDefFoundError: com/bea/plateng/patch/PatchSystem
        at com.bea.plateng.patch.PatchClientHelper.getAllPatchDetails(PatchClientHelper.java:74)
        at com.bea.plateng.patch.PatchInstallationHelper.cleanupPatchSets(PatchInstallationHelper.java:130)
        at com.bea.plateng.patch.PatchTarget.(PatchTarget.java:272)
        at com.bea.plateng.patch.PatchTargetFactory.create(PatchTargetFactory.java:30)
        at com.bea.plateng.patch.ProductAliasTarget.constructPatchTargetList(ProductAliasTarget.java:88)
        at com.bea.plateng.patch.ProductAliasTarget.(ProductAliasTarget.java:46)
        at com.bea.plateng.patch.ProductAliasTargetHelper.getProdAliasTargetList(ProductAliasTargetHelper.java:55)
        at com.bea.plateng.patch.ProductAliasTargetHelper.getAllHomeToProdAliasesTargetMap(ProductAliasTargetHelper.java:32)
        at com.bea.plateng.patch.ProductAliasTargetHelper.checkProfilesInProductAliases(ProductAliasTargetHelper.java:133)
        at com.bea.plateng.patch.Patch$1.run(Patch.java:376)
        at java.lang.Thread.run(Thread.java:662)

To resolve this, you can simply edit the bsu.sh file and increase the memory settings.

Old settings:

#!/bin/sh

JAVA_HOME="/u01/oracle/JRockit"

MEM_ARGS="-Xms256m -Xmx512m"

"$JAVA_HOME/bin/java" ${MEM_ARGS} -jar patch-client.jar $*

New settings:

#!/bin/sh

JAVA_HOME="/u01/oracle/JRockit"

MEM_ARGS="-Xms2048m -Xmx2048m"

"$JAVA_HOME/bin/java" ${MEM_ARGS} -jar patch-client.jar $*