IBM Support

Tech: Out of Memory errors during build and deploy of MCSF 8.5 on 64-bit RHEL 5.3 with 64-bit JDK on JBOSS 4.3

Troubleshooting


Problem

Tech: Out of Memory errors during build and deploy of MCSF 8.5 on 64-bit RHEL 5.3 with 64-bit JDK on JBOSS 4.3

Symptom

Build and deploy of MCSF 8.5 EAR on 64-bit RHEL with 64-bit JDK on JBoss, with or without Pre-compiled JSPs and Web Services, throws out of memory errors, specifically:

java.lang.OutOfMemoryError: Java heap space (during Build) and
java.lang.OutOfMemoryError: PermGen space (during Deployment)

Error Message

Error during Build:

[javac] The system is out of resources.
[javac] Consult the following stack trace for details.
[javac] java.lang.OutOfMemoryError: Java heap space
[javac] at com.sun.tools.javac.util.Position$LineMapImpl.build(Position.java:139)
[javac] at com.sun.tools.javac.util.Position.makeLineMap(Position.java:63)
[javac] at com.sun.tools.javac.parser.Scanner.getLineMap(Scanner.java:1105)
[javac] at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:512)
[javac] at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:550)
[javac] at com.sun.tools.javac.main.JavaCompiler.parseFiles(JavaCompiler.java:801)
[javac] at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727)
[javac] at com.sun.tools.javac.main.Main.compile(Main.java:353)
[javac] at com.sun.tools.javac.main.Main.compile(Main.java:279)
[javac] at com.sun.tools.javac.main.Main.compile(Main.java:270)
[javac] at com.sun.tools.javac.Main.compile(Main.java:69)
[javac] at com.sun.tools.javac.Main.main(Main.java:54)

Error during Deployment:

11:10:36,054 INFO  [TomcatDeployer] deploy, ctxPath=/smcfs, warUrl=.../tmp/deploy/tmp42423987048857628smcfs.ear-contents/smcfs-exp.war/
11:10:56,491 ERROR [BaseModelMBean] Exception invoking method addChild
11:11:12,195 ERROR [BaseModelMBean] Exception invoking method init
11:13:17,806 WARN  [ServiceController] Problem starting service jboss.web.deployment:war=smcfs.war,id=1932054496
java.lang.OutOfMemoryError: PermGen space

Resolving The Problem

To build the EAR successfully make the following changes to the said parameters:
 
IF pre-compiling JSPs and including Web Services, in sandbox.cfg (<INSTALL_DIR>/properties/sandbox.cfg):
 
JBOSS_PRECOMPILE_JSP=true
JBOSS_DIR=<JBOSS_HOME_Path>
EJB_3_ENABLED=true
 
Note: Optional depending on business need.  Refer to the Installation Guide 14.8.2.
 
For ANT compilation add/change the following parameters in sandbox.cfg:
 
ADDITIONAL_ANT_JAVA_TASK_ARGS=-XX\:MaxPermSize\=768m (Note: The \ is to escape the ':' and '=' symbols on a UNIX platform)
ADDITIONAL_ANT_COMPILER_TASK_ARGS=-Xms2048m -Xmx2560m
 
 
In build.properties.in (<INSTALL_DIR>/bin/build.properties.in):
 
jboss.PRECOMPILE_MAX_MEMORY=2560m
jboss.PRECOMPILE_MIN_MEMORY=512m
 
Run <INSTALL_DIR>/bin/setupfiles.sh/cmd to propagate the changes to the appropriate files bbefore the EAR is built.
 
Refer to the Installation Guide 14.8.4 for details on building EAR.
 
Note: If this is a one time activity and you do not need to build with Pre-compile JSPs option every time, then change the build.properties file instead of build.properties.in

To deploy the above built EAR,
 
set JAVA_OPTS="-XX:MaxPermSize=768m -Xmx2560m -Xms2048m"
 
in the JBoss startup script.  Refer to the Installation Guide 14.7.
 
With the above guidelines, one should be able to successfully build and deploy an EAR on a 64-bit Linux OS with 64-bit JDK on JBoss.

[{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Historical Number

NFX8113

Product Synonym

[<p><b>]Escalation ID[</b><p>];125801;[<p><b>]Fix ID[</b><p>];209169;[<p><b>]Severity[</b><p>];Normal;[<p><b>]Type[</b><p>];NormalFix

Document Information

Modified date:
16 June 2018

UID

swg21558495