Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-707

Recievign very large attachments in the clent will cause a OutOfMemoryError

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 1.5.9, 2.0.1
    • Fix Version/s: 3.0.0.RELEASE
    • Component/s: Core
    • Labels:
      None

      Description

      AbstractHttpSenderConnectio.hasResponse reads the enter message into memory in order to ensure a message exists. When dealing with large messages this causes an OutOfMemoryError:

      Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
      at java.util.Arrays.copyOf(Arrays.java:2786)
      at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:94)
      at org.springframework.util.FileCopyUtils.copy(FileCopyUtils.java:113)
      at org.springframework.util.FileCopyUtils.copyToByteArray(FileCopyUtils.java:164)
      at org.springframework.ws.transport.http.AbstractHttpSenderConnection.hasResponse(AbstractHttpSenderConnection.java:72)
      at org.springframework.ws.transport.AbstractSenderConnection.createTransportInputStream(AbstractSenderConnection.java:46)
      at org.springframework.ws.transport.AbstractWebServiceConnection.receive(AbstractWebServiceConnection.java:86)
      at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:548)
      at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:496)
      at gov.ic.dia.cdir.client.CdirFetchServicesClientImpl.fetchWithAttachments(CdirFetchServicesClientImpl.java:160)
      at gov.ic.dia.cdir.client.CommandLineClient.testFetchEnclosure(CommandLineClient.java:283)
      at gov.ic.dia.cdir.client.CommandLineClient.main(CommandLineClient.java:129)

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        1053d 17h 7m 1 Arjen Poutsma 18/Mar/14 3:53 AM
        Resolved Resolved Reopened Reopened
        1316d 12h 26m 1 Greg Turnquist 24/Oct/17 4:19 PM
        Reopened Reopened Resolved Resolved
        1m 52s 1 Greg Turnquist 24/Oct/17 4:21 PM
        Resolved Resolved Closed Closed
        2s 1 Greg Turnquist 24/Oct/17 4:21 PM

          People

          • Assignee:
            gregturn Greg Turnquist
            Reporter:
            karthikramachandran Karthik Ramacahndran
          • Votes:
            4 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: