Friday, 5 January 2018

java.lang.OutOfMemoryError: Java heap space error while Applying Oracle Weblogic Server Patch using BSU

========================================================================
Environment Details:
Weblogic Server : 10.3.6
Linux Version: CentOS7

========================================================================
Problem Summary:
We are unable to apply oracle wblogic 10.3.6 patch becuase of java.lang.OutOfMemoryError: Java heap space

Error:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.AbstractCollection.toArray(AbstractCollection.java:136)
at java.util.ArrayList.addAll(ArrayList.java:559)
at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.getProperties(SchemaTypeImpl.java:705)
at com.bea.cie.common.dao.xbean.XBeanDataHandler.loadPropertyMap(XBeanDataHandler.java:775)
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)
Exception in thread "Thread-0" java.lang.NoClassDefFoundError: Could not initialize class 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.<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)


========================================================================
Root Cause:
Heap size configured for BSU is not sufficient

========================================================================
Resolution:
1. Go to $MIDDLEWARE_HOME/utils/bsu
2. Edit bsu.sh
3. Change the memory arguments from
MEM_ARGS="-Xms256m -Xmx512m"
To
MEM_ARGS="-Xms2048m -Xmx2048m"
4. Save the changes.
5. Try to apply patch again.

1 comment: