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 apache.org by Unknown author, 1 year ago
via Apache's JIRA Issue Tracker by Stefano Bortoli, 1 year ago
Java heap space
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.StringBuilder.append(StringBuilder.java:130)
at java.lang.StringBuilder.append(StringBuilder.java:171)
at org.jboss.logmanager.formatters.Formatters$JustifyingFormatStep.render(Formatters.java:157)
at org.jboss.logmanager.formatters.MultistepFormatter.format(MultistepFormatter.java:86)
at org.jboss.logmanager.ExtFormatter.format(ExtFormatter.java:35)
at org.jboss.logmanager.handlers.WriterHandler.doPublish(WriterHandler.java:49)
at org.jboss.logmanager.ExtHandler.publish(ExtHandler.java:64)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:283)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:291)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:291)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:291)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:291)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:291)
at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:291)
at org.jboss.logmanager.Logger.logRaw(Logger.java:649)
at org.jboss.logmanager.Logger.log(Logger.java:467)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.handleRenderException(FaceletViewHandlingStrategy.java:894)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:414)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:127)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:117)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:309)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:734)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:541)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:479)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:407)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
2 times, 3 weeks ago
Once, 5 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
2 times, 1 year ago
61 more bugmates

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