It's all about the answers!

Ask a question

RPE Error in launcher : java.lang.OutOfMemoryError: Java heap space


Jyotsna Prasad (1920) | asked Apr 29 '19, 7:16 a.m.

 Hello,


I am generating list of all specific type of requirements in the project area using JRS export to RPE.
In JRS export to excel, total no. of rows is ~24000 and no. of column is 11.

On exporting the report to RPE and generating excel output, RPE launcher throws an exception as below : 

Exception in thread "Active Thread: Equinox Container: 60adc4c2-2e6a-0019-11fc-bc78c3b107ef" java.lang.OutOfMemoryError: Java heap space
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1866)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2079)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1104)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:820)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1085)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.lang.Thread.run(Thread.java:785)
CRRPE1064I Aborting engine execution...
CRRPE1064I 1354500 publishing commands are processed. 18307 publishing commands remain to be processed.
CRRPE1064I 1356000 publishing commands are processed. 16807 publishing commands remain to be processed.
CRRPE1064I 1357500 publishing commands are processed. 15307 publishing commands remain to be processed.
CRRPE1064I 1359000 publishing commands are processed. 13807 publishing commands remain to be processed.
CRRPE1064I 1360500 publishing commands are processed. 12307 publishing commands remain to be processed.
CRRPE1064I 1362000 publishing commands are processed. 10807 publishing commands remain to be processed.
CRRPE1064I 1363500 publishing commands are processed. 9307 publishing commands remain to be processed.
CRRPE1064I 1365000 publishing commands are processed. 7807 publishing commands remain to be processed.
CRRPE1064I 1366500 publishing commands are processed. 6307 publishing commands remain to be processed.
CRRPE1064I 1368000 publishing commands are processed. 4807 publishing commands remain to be processed.
CRRPE1064I 1369500 publishing commands are processed. 3307 publishing commands remain to be processed.
CRRPE1064I 1371000 publishing commands are processed. 1807 publishing commands remain to be processed.
CRRPE1064I 1372500 publishing commands are processed. 307 publishing commands remain to be processed.
CRRPE1064I 1372808 publishing commands are processed. 0 publishing commands remain to be processed.
CRRPE3097I The document template is processed. If there are no more templates to process, output files are being written.
CRRPE1064I Document generation finished in 4407 seconds. 
CRRPE3603I Enable the Core Debug Mode for RPE to receive additional information on errors.
Exception in thread "RRDG_1:90-CORE" java.lang.OutOfMemoryError: Java heap space
at java.util.HashMap.newNode(HashMap.java:1753)
at java.util.HashMap.putVal(HashMap.java:641)
at java.util.HashMap.putMapEntries(HashMap.java:525)
at java.util.HashMap.putAll(HashMap.java:795)
at com.ibm.rational.rpe.engine.evaluator.EvaluationContext.copyOf(EvaluationContext.java:56)
at com.ibm.rational.rpe.engine.core.executor.TemplateExecutor.processElement(TemplateExecutor.java:682)
at com.ibm.rational.rpe.engine.core.executor.TemplateExecutor.processElement(TemplateExecutor.java:711)
at com.ibm.rational.rpe.engine.core.executor.TemplateExecutor.processElement(TemplateExecutor.java:887)
at com.ibm.rational.rpe.engine.core.executor.TemplateExecutor.execute(TemplateExecutor.java:427)
at com.ibm.rational.rpe.engine.RRDGEngine.run(RRDGEngine.java:1306)
at java.lang.Thread.run(Thread.java:785)
CRRPE1022I The process was completed in 4,412.512 seconds.
CRRPE1023E The document could not be generated.

Can anyone please suggest the solution for this? For me it seems, the heapsize fixed for RPE is less or have some restriction to amount of data it can generate. Is my understanding correct?

Also, I checked the rpe-launcher.ini file for the settings and below is the info - 

-vm
..\jre\bin
--launcher.library
C:\Program Files\IBM\Rational\Publishing Engine_1\launcher
-vmargs
-Xms56m
-Xmx1024m
-Dfile.encoding=UTF-8
-Dcom.ibm.rational.rpe.console.limit=100000
-Dcom.ibm.rational.rpews.url
-Dosgi.configuration.area=@user.home/Application Data/IBM/Rational/RPE_20171206_0341/Launcher/configuration/
-Dosgi.instance.area=@user.home/Application Data/IBM/Rational/RPE_20171206_0341/Launcher/workspace/
-Dcom.ibm.rational.rpe.disableDefaultAuthenticator=true
-DRPE_HOME=C:\Program Files\IBM\Rational\Publishing Engine_1

Do I need to increase the "-Xmx" arg value? If yes, won't it impact other applications/system?

Thank you.

2 answers



permanent link
Fariz Saracevic (904613) | answered Apr 29 '19, 4:31 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

The default value for the heap size is 1 GB. When you are seeing the out of memory error, you could  increase this value up to 1.5 GB. See online help for details https://www.ibm.com/support/knowledgecenter/SS6RHZ_6.0.6.1/com.ibm.rational.pe.troubleshooting.doc/topics/t_startup_out_memory.html


permanent link
foster carly (11) | answered Aug 04 '21, 3:30 a.m.

 Usually, this error is thrown when the Java Virtual Machine cannot allocate an object because it is out of memory, and no more memory could be made available by the garbage collector.


Therefore you pretty much have two options:
  • Increase the default memory your program is allowed to use using the -Xmx option (for instance for 1024 MB: -Xmx1024m)
  • Modify your program so that it needs less memory, using less big data structures and getting rid of objects that are not any more used at some point in your program

Increasing the heap size is a bad solution, 100% temporary. It will crash again in somewhere else. To avoid these issues, write high performance code.
  • Use local variables wherever possible.
  • Make sure you select the correct object (EX: Selection between String, StringBuffer and StringBuilder)
  • Use a good code system for your program(EX: Using static variables VS non static variables)
  • Other stuff which could work on your code.
  • Try to move with Multy Threading


Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.