Java Heap Size Problem

Topics: C, Java, Sun Microsystems Pages: 2 (406 words) Published: August 28, 2008
Problem:

The error 'java.lang.OutOfMemoryError: Java heap space' is caused when the JVM (Java Virtual Machine) runs out of available memory during processing. This can be caused by:

a large number of files on your system
an extremely large benchmark document
an OVAL test that returns a large number of results
a system that doesn't meet the minimum memory requirement of the NG Scoring tool (256MB) The NG tool by default sets a maximum heap size of 256MB. The directions below describe how to increase this value on UNIX and Windows systems.

Solution:

For UNIX systems:

When running the tool include the heap space argument '-Xmx'. For example:

./ng.sh -Xmx512m

Where '-Xmx512m' sets the maximum heap size to 512MB of memory. Higher values may be used where additional memory is available.

For Windows systems:

1. Edit cli.bat located in the directory the tool was installed to. This directory is 'c:\Program Files\The Center for Internet Security\CIS NG Scoring Tool' by default on most systems.

2. On line 33 change the text -Xmx256m to a larger value. For example:

java -Xmx512m -Djava.library.path=./lib -classpath '%CLASSPATH%' org.cis.cli.Application %*

Where '-Xmx512m' sets the maximum heap size to 512MB of memory. Higher values may be used where additional memory is available.

3. Repeat step 2 on gui.bat also located in the directory the tool was installed to.

Additional Comments:

Example exception:

org.cis.ng.interpreter.BenchmarkProcessingException: unable to write the XCCDF report at org.cis.ng.interpreter.DefaultProcessingHandle.process(DefaultProcessingHandle.java:619) at org.cis.ng.interpreter.DefaultProcessingHandle.process(DefaultProcessingHandle.java:445) at org.cis.swing.BenchmarkSelectorPane$4.run(BenchmarkSelectorPane.java:232) at java.lang.Thread.run(Unknown Source)

Caused by: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space at...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • problems in java Essay
  • Java Essay
  • Essay on Java
  • Java Research Paper
  • java Essay
  • JAVA Essay
  • java Essay
  • Java Essay

Become a StudyMode Member

Sign Up - It's Free