org.apache.velocity.exception.MethodInvocationException: Invocation of method 'export' in class com.xpn.xwiki.plugin.packaging.PackageAPI threw exception java.lang.OutOfMemoryError: Java heap space @ Packager.Export[25,11]

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 Vincent Massol, 1 year ago
Invocation of method 'export' in class com.xpn.xwiki.plugin.packaging.PackageAPI threw exception java.lang.OutOfMemoryError: Java heap space @ Packager.Export[25,11]
via GitHub by kingsleyh
, 2 years ago
Invocation of method 'get' in class java.util.ArrayList in template templates/featureOverview.vm at line=203 column=279 threw exception class java.lang.IndexOutOfBoundsException : Index: 2, Size: 2
via Atlassian JIRA by Brian Nguyen (HipChat), 1 year ago
Invocation of method 'getText' in class com.atlassian.jira.web.bean.I18nBean threw exception class java.lang.IllegalArgumentException : Unmatched braces in the pattern.
via Atlassian JIRA by Brian Nguyen (HipChat), 1 year ago
Invocation of method 'getText' in class com.atlassian.jira.web.bean.I18nBean threw exception class java.lang.IllegalArgumentException : Unmatched braces in the pattern.
via Atlassian JIRA by Piper Keairnes, 1 year ago
Invocation of method 'generateAncestryBreadcrumbs' in class com.atlassian.confluence.pages.actions.ViewPageAction threw exception class net.sf.hibernate.LazyInitializationException : Failed to lazily initialize a collection
via Atlassian JIRA by Piper Keairnes, 1 year ago
Invocation of method 'generateAncestryBreadcrumbs' in class com.atlassian.confluence.pages.actions.ViewPageAction threw exception class net.sf.hibernate.LazyInitializationException : Failed to lazily initialize a collection
org.apache.velocity.exception.MethodInvocationException: Invocation of method 'export' in class com.xpn.xwiki.plugin.packaging.PackageAPI threw exception java.lang.OutOfMemoryError: Java heap space @ Packager.Export[25,11]
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.writeNodeText(XMLWriter.java:1291)
at org.dom4j.io.XMLWriter.writeNode(XMLWriter.java:1311)
at org.dom4j.io.XMLWriter.writeElementContent(XMLWriter.java:1122)
at org.dom4j.io.XMLWriter.writeElement(XMLWriter.java:949)
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:2032)
at com.xpn.xwiki.doc.XWikiDocument.toXML(XWikiDocument.java:2088)
at com.xpn.xwiki.plugin.packaging.Package.addToZip(Package.java:807)
at com.xpn.xwiki.plugin.packaging.Package.export(Package.java:334)
at com.xpn.xwiki.plugin.packaging.PackageAPI.export(PackageAPI.java:169)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74)

Users with the same issue

22 times, 3 days ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
2 times, 5 months ago
Samebug visitor profile picture
Unknown user
Once, 10 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.