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 XWiki.org JIRA by ZhaolinFeng, 1 year ago
Java heap space
via Google Groups by Michael Hunger, 3 months ago
via xradar by moucard
, 1 year ago
Java heap space
via nutch-user by BELLINI ADAM, 1 year ago
via nutch-user by BELLINI ADAM, 1 year 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 java.io.StringWriter.write(StringWriter.java:84)
at org.dom4j.io.XMLWriter.writeElement(XMLWriter.java:962)
at org.dom4j.io.XMLWriter.writeNode(XMLWriter.java:1301)
at org.dom4j.io.XMLWriter.writeElementContent(XMLWriter.java:1136)
at org.dom4j.io.XMLWriter.writeElement(XMLWriter.java:954)
at org.dom4j.io.XMLWriter.writeNode(XMLWriter.java:1301)
at org.dom4j.io.XMLWriter.writeElementContent(XMLWriter.java:1136)
at org.dom4j.io.XMLWriter.writeElement(XMLWriter.java:954)
at org.dom4j.io.XMLWriter.writeNode(XMLWriter.java:1301)
at org.dom4j.io.XMLWriter.write(XMLWriter.java:344)
at com.xpn.xwiki.doc.XWikiDocument.toXML(XWikiDocument.java:3172)
at com.xpn.xwiki.doc.XWikiDocument.toXML(XWikiDocument.java:3228)
at com.xpn.xwiki.plugin.packaging.Package.addToZip(Package.java:941)
at com.xpn.xwiki.plugin.packaging.Package.export(Package.java:332)
at com.xpn.xwiki.plugin.packaging.PackageAPI.export(PackageAPI.java:212)
at com.xpn.xwiki.plugin.packaging.PackageAPI.backupWiki(PackageAPI.java:261)
at com.xpn.xwiki.web.ExportAction.exportXAR(ExportAction.java:262)
at com.xpn.xwiki.web.ExportAction.render(ExportAction.java:60)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:214)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)

Users with the same issue

22 times, 5 days ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
2 times, 5 months ago
Samebug visitor profile picture
Unknown user
Once, 11 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
60 more bugmates

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