IBM Support

OutOfMemoryError using Rational Rhapsody Add-ons

Troubleshooting


Problem

Attempts to use Java add-ons in IBM Rational Rhapsody results in java.lang.OutOfMemoryError.

Symptom

The full error message is as follows:

java.lang.OutOfMemoryError: Java heap space

When you open a Rational Rhapsody project, you possibly see Java Virtual Machine (JVM) error -4.

An example of an add-on is arxml import/export.

Cause

The JVM needs more memory.

Resolving The Problem

Increase the JVM maximum heap size through the JVM parameter -Xmx.

To do so, you can change the Java settings in rhapsody.ini.


[JVM]
JavaLocation=...
VMArgs_MaxHeapSize=-Xmx512m
Options=ClassPath,LibPath,VMArgs_MaxHeapSize
.....

If the JVM initialization fails with JVM error -4 after you increased the maximum heap size, change other JVM parameters.

Examples

Disable Just In Time (JIT) through the following parameter.


 -Djava.compiler=NONE.

You can disable JIT in rhapsody.ini.


[JVM]
JavaLocation=...
VMArgs_MaxHeapSize=-Xmx512m
VMArgs_JIT=-Djava.compiler=NONE
Options=ClassPath,LibPath,VMArgs_MaxHeapSize,VMArgs_JIT
...

Use the following Rational Rhapsody command-line parameter.


-cmd=loadjvm

This parameter initializes the JVM during initialization of Rational Rhapsody, before Rational Rhapsody opens the project and uses and fragments more memory.

The command-line also need to include all other JVM related command-line options, for example.


rhapsody.exe  -cmd=loadjvm "-Xmx512m"

Note that you need to remove the corresponding JVM related command-line options from rhapsody.ini.

For example remove the following line.


VMArgs_MaxHeapSize=-Xmx512m

[{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.5.2;7.5.1.1;7.5.1;7.5.0.1;7.5","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg21428956