java.lang.OutOfMemoryError: Java heap space

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Confluence CLI is being used, but it doesn't do much other than call the *addAttachment* Remote API service. The [documentation|https://developer.atlassian.com/display/CONFDEV/Confluence+XML-RPC+and+SOAP+APIs] says: bq. Note that this uses a lot of memory - about 4 times the size of the attachment. Can attach files around 3 MBs, but problems when larger files. 13 MBs fails (see https://studio.plugins.atlassian.com/browse/CSOAP-114). I attempted 23 MBs with a 4GB java heap size. Same file can be attached via UI fine. {noformat} java.lang.OutOfMemoryError: Java heap space; nested exception is: java.lang.OutOfMemoryError: Java heap space at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2938) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) at javax.xml.parsers.SAXParser.parse(SAXParser.java:395) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at org.swift.common.soap.confluence.ConfluenceserviceV2SoapBindingStub.addAttachment(ConfluenceserviceV2SoapBindingStub.java:4857) at org.swift.confluence.cli.ConfluenceClient.addAttachment(ConfluenceClient.java:1707) at org.swift.confluence.cli.ConfluenceClient.addAttachment(ConfluenceClient.java:1646) at org.swift.confluence.cli.ConfluenceClient.handleRequest(ConfluenceClient.java:471) at org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:119) at org.swift.common.cli.CliClient.doWork(CliClient.java:225) at org.swift.confluence.cli.ConfluenceClient.main(ConfluenceClient.java:115) {noformat} h4. Workaround - Attach the file through Confluence interface - Use "doattachfile.action" controller using a tool like [curl|http://curl.haxx.se/], so your command line would look like: {noformat} curl -F file_0=@<path to file> -F pageId=<confluence page id> -u <username>:<password> "http://Confluence-URL/pages/doattachfile.action" {noformat} or, - Use WebDAV and intermediary mean to upload/attach files. For more details on this, please review the following docs: https://confluence.atlassian.com/display/DOC/Configuring+a+WebDAV+client+for+Confluence https://confluence.atlassian.com/display/AOD/Uploading+Data+via+WebDAV
    via by Bob Swift [Bob Swift Atlassian Add-ons],
  • Confluence CLI is being used, but it doesn't do much other than call the *addAttachment* Remote API service. The [documentation|https://developer.atlassian.com/display/CONFDEV/Confluence+XML-RPC+and+SOAP+APIs] says: bq. Note that this uses a lot of memory - about 4 times the size of the attachment. Can attach files around 3 MBs, but problems when larger files. 13 MBs fails (see https://studio.plugins.atlassian.com/browse/CSOAP-114). I attempted 23 MBs with a 4GB java heap size. Same file can be attached via UI fine. {noformat} java.lang.OutOfMemoryError: Java heap space; nested exception is: java.lang.OutOfMemoryError: Java heap space at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2938) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) at javax.xml.parsers.SAXParser.parse(SAXParser.java:395) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at org.swift.common.soap.confluence.ConfluenceserviceV2SoapBindingStub.addAttachment(ConfluenceserviceV2SoapBindingStub.java:4857) at org.swift.confluence.cli.ConfluenceClient.addAttachment(ConfluenceClient.java:1707) at org.swift.confluence.cli.ConfluenceClient.addAttachment(ConfluenceClient.java:1646) at org.swift.confluence.cli.ConfluenceClient.handleRequest(ConfluenceClient.java:471) at org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:119) at org.swift.common.cli.CliClient.doWork(CliClient.java:225) at org.swift.confluence.cli.ConfluenceClient.main(ConfluenceClient.java:115) {noformat} h4. Workaround - Attach the file through Confluence interface - Use "doattachfile.action" controller using a tool like [curl|http://curl.haxx.se/], so your command line would look like: {noformat} curl -F file_0=@<path to file> -F pageId=<confluence page id> -u <username>:<password> "http://Confluence-URL/pages/doattachfile.action" {noformat} or, - Use WebDAV and intermediary mean to upload/attach files. For more details on this, please review the following docs: https://confluence.atlassian.com/display/DOC/Configuring+a+WebDAV+client+for+Confluence https://confluence.atlassian.com/display/AOD/Uploading+Data+via+WebDAV
    via by Bob Swift [Bob Swift Atlassian Add-ons],
  • java.lang.OutOfMemoryError
    via by 843833,
  • I get Out of memory errors when uploading files to Confluence (v5.1.2). This happens with files > 25 MB. {noformat} [confluence] - Uploading file: Ipsos.MediaCell_v2.8_PanelistWebsite.zip (application/zip) ERROR: Unable to upload file... AxisFault faultCode: \{http://schemas.xmlsoap.org/soap/envelope/}Server.generalException faultSubcode: faultString: java.lang.OutOfMemoryError: Java heap space; nested exception is: java.lang.OutOfMemoryError: Java heap space faultActor: faultNode: faultDetail: {}faultData:null \{http://xml.apache.org/axis/}hostname:barral java.lang.OutOfMemoryError: Java heap space; nested exception is: java.lang.OutOfMemoryError: Java heap space at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:606) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1741) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2898) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:302) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at jenkins.plugins.confluence.soap.v1.ConfluenceserviceV1SoapBindingStub.addAttachment(ConfluenceserviceV1SoapBindingStub.java:4896) at com.myyearbook.hudson.plugins.confluence.ConfluenceSession.addAttachment(ConfluenceSession.java:181) at com.myyearbook.hudson.plugins.confluence.ConfluenceSession.addAttachment(ConfluenceSession.java:201) at com.myyearbook.hudson.plugins.confluence.ConfluencePublisher.performAttachments(ConfluencePublisher.java:241) at com.myyearbook.hudson.plugins.confluence.ConfluencePublisher.perform(ConfluencePublisher.java:314) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726) at hudson.model.Run.execute(Run.java:1601) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:241) {noformat}
    via by Alexis Seigneurin,
  • I get Out of memory errors when uploading files to Confluence (v5.1.2). This happens with files > 25 MB. {noformat} [confluence] - Uploading file: Ipsos.MediaCell_v2.8_PanelistWebsite.zip (application/zip) ERROR: Unable to upload file... AxisFault faultCode: \{http://schemas.xmlsoap.org/soap/envelope/}Server.generalException faultSubcode: faultString: java.lang.OutOfMemoryError: Java heap space; nested exception is: java.lang.OutOfMemoryError: Java heap space faultActor: faultNode: faultDetail: {}faultData:null \{http://xml.apache.org/axis/}hostname:barral java.lang.OutOfMemoryError: Java heap space; nested exception is: java.lang.OutOfMemoryError: Java heap space at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:606) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1741) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2898) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:302) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at jenkins.plugins.confluence.soap.v1.ConfluenceserviceV1SoapBindingStub.addAttachment(ConfluenceserviceV1SoapBindingStub.java:4896) at com.myyearbook.hudson.plugins.confluence.ConfluenceSession.addAttachment(ConfluenceSession.java:181) at com.myyearbook.hudson.plugins.confluence.ConfluenceSession.addAttachment(ConfluenceSession.java:201) at com.myyearbook.hudson.plugins.confluence.ConfluencePublisher.performAttachments(ConfluencePublisher.java:241) at com.myyearbook.hudson.plugins.confluence.ConfluencePublisher.perform(ConfluencePublisher.java:314) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726) at hudson.model.Run.execute(Run.java:1601) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:241) {noformat}
    via by Alexis Seigneurin,
    • java.lang.OutOfMemoryError: Java heap space at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2938) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) at javax.xml.parsers.SAXParser.parse(SAXParser.java:395) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at org.swift.common.soap.confluence.ConfluenceserviceV2SoapBindingStub.addAttachment(ConfluenceserviceV2SoapBindingStub.java:4857) at org.swift.confluence.cli.ConfluenceClient.addAttachment(ConfluenceClient.java:1707) at org.swift.confluence.cli.ConfluenceClient.addAttachment(ConfluenceClient.java:1646) at org.swift.confluence.cli.ConfluenceClient.handleRequest(ConfluenceClient.java:471) at org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:119) at org.swift.common.cli.CliClient.doWork(CliClient.java:225) at org.swift.confluence.cli.ConfluenceClient.main(ConfluenceClient.java:115)
    No Bugmate found.