In this post we will resolve the ‘java.lang.OutOfMemoryError Java heap space’ issue while apply the Oracle WebLogic Server Patch Set Update 10.3.6.0.191015. Here we will know how to resolve out of memory error in java.
Install bsu patches using sh bsu.sh install and resolve.
Java.Lang.OutOfMemoryError java heap space issue
$sh bsu.sh -install -patch_download_dir=$FMW_HOME/utils/bsu/cache_dir -
patchlist=3L3H -prod_dir=/data02/EBS_r12.2.5/fs1/FMW_Home/wlserver_10.3
Error:-
Facing below error as ‘outofmemoryerror’ while executing the sh bsu.sh -install on patch file system.
Exception in thread "Thread-0" Exception in thread "main" Exception in
thread "Timer-0" java.lang.NoClassDefFoundError: Could not initialize
class com.bea.plateng.patch.PatchSystem
at com.bea.plateng.patch.PatchClientHelper.getAllPatchDetails(PatchClientHe
lper.java:74)
at com.bea.plateng.patch.PatchInstallationHelper.cleanupPatchSets(PatchInstallationHelper.java:130)
at com.bea.plateng.patch.PatchTarget.<init>(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.<init>(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:745)
java.lang.OutOfMemoryError: Java heap space
at java.lang.StringCoding.encode(StringCoding.java:338)
at java.lang.String.getBytes(String.java:916)
at java.io.UnixFileSystem.canonicalize0(Native Method)
at java.io.UnixFileSystem.canonicalize(UnixFileSystem.java:172)
at java.io.File.getCanonicalPath(File.java:618)
at
java.util.prefs.FileSystemPreferences.lockFile(FileSystemPreferences.java:902)
at java.util.prefs.FileSystemPreferences.sync(FileSystemPreferences.java:729)
at java.util.prefs.FileSystemPreferences.flush(FileSystemPreferences.java:824)
at java.util.prefs.FileSystemPreferences.syncWorld(FileSystemPreferences.java:464)
at java.util.prefs.FileSystemPreferences.access$1200(FileSystemPreferences.java:50)
at java.util.prefs.FileSystemPreferences$3.run(FileSystemPreferences.java:432)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
java.lang.OutOfMemoryError: Java heap space
at java.util.HashMap.createEntry(HashMap.java:897)
at java.util.HashMap.addEntry(HashMap.java:884)
at java.util.HashMap.put(HashMap.java:505)
at com.bea.cie.common.dao.xbean.XBeanDataHandler.loadPropertyMap(XBeanDataHandler.java:778)
at com.bea.cie.common.dao.xbean.XBeanDataHandler.<init>(XBeanDataHandler.java:99)
at com.bea.cie.common.dao.xbean.XBeanDataHandler.createDataHandler(XBeanDataHandler.java:559)
at com.bea.cie.common.dao.xbean.XBeanDataHandler.getComplexValue(XBeanDataHandler.java:455)
at com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getPatchDependencies(PatchCatalogHelper.java:442)
at com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getPatchDependencies(PatchCatalogHelper.java:464)
at com.bea.plateng.patch.dao.cat.PatchCatalog.getPatchDependencies(PatchCatalog.java:56)
at com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getInvalidatedPatchMap(PatchCatalogHelper.java:1621)
at com.bea.plateng.patch.PatchSystem.updatePatchCatalog(PatchSystem.java:436)
at com.bea.plateng.patch.PatchSystem.refresh(PatchSystem.java:130)
at com.bea.plateng.patch.PatchSystem.<init>(PatchSystem.java:114)
at com.bea.plateng.patch.PatchSystem.<clinit>(PatchSystem.java:41)
at com.bea.plateng.patch.Patch.main(Patch.java:279)
Solution:-
– Navigate to the {MW_HOME}/utils/bsu directory.
– Configuring Memory options
For Microsoft Windows systems
Edit the bsu.cmd script and change memory options as follows:
set MEM_ARGS=-Xms1024m -Xmx3072m
For UNIX Systems
Edit the bsu.sh script and change memory options as follows:
MEM_ARGS=”-Xms1024m -Xmx3072m”
Retest the issue: – Once we modified the above value, after that we need to retry the installation as below to fix the java lang outofmemoryerror java heap space error.
$sh bsu.sh -install -patch_download_dir=$FMW_HOME/utils/bsu/cache_dir -
patchlist=3L3H -prod_dir=/data02/EBS_r12.2.5/fs1/FMW_Home/wlserver_10.3
Checking for conflicts…………..
Conflict(s) detected – resolve conflict condition and execute patch installation again
Conflict condition details follow:
Patch 3L3H is mutually exclusive and cannot coexist with patch(es):
CW9T,1LRI,FCX7,2GYW,BLTG,VKXF,YHJK,Y5AP
It means now patching is working…
Verify:-
Once install the Weblogic patches, need to verify using below command.
cd $MW_HOME/utils/bsu/
bsu.sh -prod_dir=$MW_HOME\wlserver_10.3 -status=applied -verbose -view
Thanks for reading this article, You may check another post to resolve the issue. Click here.
You may check another similar article, click here.