java.lang.OutOfMemoryError: Requested array size exceeds VM limit

JDK Bug System | Shadow Bug | 1 year ago
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.

Root Cause Analysis

  1. java.lang.OutOfMemoryError

    Requested array size exceeds VM limit

    at java.util.Arrays.copyOf()
  2. Java RT
    1. java.util.Arrays.copyOf(
    2. java.lang.AbstractStringBuilder.expandCapacity(
    3. java.lang.AbstractStringBuilder.ensureCapacityInternal(
    4. java.lang.AbstractStringBuilder.ensureCapacity(
    5. java.lang.StringBuilder.ensureCapacity(
    5 frames