java.lang.OutOfMemoryError: Java heap space

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
via oracle.com by Unknown author

An easy way to solve OutOfMemoryError in java is to increase the maximum heap size by using JVM options -Xmx512M, this will immediately solve your OutOfMemoryError.

,
via Stack Overflow by Eugene Yokota

In Eclipse : go to Run --> Run Configurations --> then select the project under maven build --> then select the tab "JRE" --> then enter -Xmx1024m

This should increase the memory heap for all the builds/projects. The above memory size is 1 GB

Solutions on the web

via Spring JIRA by Mario Martínez Sánchez - gvNIX - DISID, 1 year ago
Java heap space
via Spring JIRA by Mario Martínez Sánchez - gvNIX - DISID, 1 year ago
Java heap space
via Google Groups by Chris Seidel, 4 months ago
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2882)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
at java.lang.StringBuffer.append(StringBuffer.java:224)
at org.apache.commons.lang3.builder.ToStringStyle.appendFieldSeparator(ToStringStyle.java:1503)
at org.apache.commons.lang3.builder.ToStringStyle.appendFieldEnd(ToStringStyle.java:1526)
at org.apache.commons.lang3.builder.ToStringStyle.append(ToStringStyle.java:439)
at org.apache.commons.lang3.builder.ToStringBuilder.append(ToStringBuilder.java:848)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.appendFieldsIn(ReflectionToStringBuilder.java:522)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:683)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:282)
at es.gva.cit.regproy.web.TrgpTipoSoporte_Roo_ToString.ajc$interMethod$es_gva_cit_regproy_web_TrgpTipoSoporte_Roo_ToString$es_gva_cit_regproy_web_TrgpTipoSoporte$toString(TrgpTipoSoporte_Roo_ToString.aj:13)
at es.gva.cit.regproy.web.TrgpTipoSoporte.toString(TrgpTipoSoporte.java:1)
at java.lang.String.valueOf(String.java:2826)
at java.lang.StringBuffer.append(StringBuffer.java:219)
at org.apache.commons.lang3.builder.ToStringStyle.appendDetail(ToStringStyle.java:586)
at org.apache.commons.lang3.builder.ToStringStyle.appendInternal(ToStringStyle.java:550)
at org.apache.commons.lang3.builder.ToStringStyle.append(ToStringStyle.java:436)
at org.apache.commons.lang3.builder.ToStringBuilder.append(ToStringBuilder.java:848)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.appendFieldsIn(ReflectionToStringBuilder.java:522)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:683)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:282)
at es.gva.cit.regproy.web.TrgpDocumentoAnexado_Roo_ToString.ajc$interMethod$es_gva_cit_regproy_web_TrgpDocumentoAnexado_Roo_ToString$es_gva_cit_regproy_web_TrgpDocumentoAnexado$toString(TrgpDocumentoAnexado_Roo_ToString.aj:13)
at es.gva.cit.regproy.web.TrgpDocumentoAnexado.toString(TrgpDocumentoAnexado.java:1)
at java.lang.String.valueOf(String.java:2826)
at java.lang.StringBuilder.append(StringBuilder.java:115)
at java.util.AbstractCollection.toString(AbstractCollection.java:422)
at java.lang.String.valueOf(String.java:2826)
at java.lang.StringBuffer.append(StringBuffer.java:219)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
23 times, 3 hours ago
Samebug visitor profile picture
Unknown user
Once, 6 hours ago
55 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.