IBM Version 52 Computer Accessories User Manual


 
than the rate the finalization thread can process, may generate this error.
Exception in thread “main” java.lang.OutOfMemoryError: PermGen
space
This error is seen when permanent generation is full. Permanent generation is the
area in which the class and method objects are stored. For an application that loads
a large number of classes, the value of –XX:MaxPermSize should be sized
accordingly. Permanent generation also gets used when the java.lang.String intern()
method is invoked on an object of class java.lang.String. Exhaustion of the
permanent generation area may occur if an application interns a large number of
strings.
Generally, java.lang.String maintains the string pool, and when an interned method
is called on a string, it first verifies that an equal string is already present in the
pool. If an equal string exists, java.lang.String returns the canonical representation
of the string, which points to the same class instance; otherwise, java.lang.String
adds the string to the pool.
Exception in thread “main” java.lang.OutOfMemoryError: Requested
array size exceeds VM limit
This error occurs when the application requests the JVM to allocate an array that is
larger than the heap size. For example, if the application requests an allocation of
512 MB array and your heap size is only 256 MB, this error will be seen. This error
may occur because of a low –Xms value, or a bug in the application in which it is
trying to create a huge array.
Exception in thread “main” java.lang.OutOfMemoryError: request
<size> bytes for <reason>. Out of swap space?
Although the error is an OOM condition, the underlying cause is that the JVM
failed to allocate the requested size from the native heap, and the native heap is
close to exhaustion.
The <size> in the error message is the size that failed to allocate. The <reason> is
the name of the source module reporting failure. In a few cases, the actual reason
is printed.
In order to troubleshoot this error, use the OS utilities to find the actual cause. One
possible cause is that the OS has been configured with insufficient swap space.
Another possible cause is that other processes in the machine are consuming all the
memory, or possibly a native leak, in which the application or the library code is
continuously allocating memory, and the OS is not releasing it.
Exception in thread "main" java.lang.OutOfMemoryError: <reason>
<stack trace>(Native method):
If you see this OOM, it means that the native method encountered an allocation
failure. The main difference between this error and the Exception in thread
mainjava.lang.OutOfMemoryError: request <size> bytes for <reason>. Out
of swap space? error is that the allocation failure in this case occurred in the
JNInative method rather than the JVM code. In order to troubleshoot this error, use
the OS utilities to find the actual cause.
74 Sterling B2B Integrator: Performance Management