Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-4113

Whole response is cached in memory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Incomplete
    • 1.4.18
    • None
    • wicket
    • None

    Description

      In class org.apache.wicket.protocol.http.portlet.WicketResponseState there is used CharArrayWriterBuffer and ByteArrayOutputStream to cache in memory whole response.

      This creates issues with Java heap space when downloading big files:

      Caused by: java.lang.OutOfMemoryError: Java heap space
      	at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:70)
      	at org.apache.wicket.protocol.http.portlet.WicketResponseState$1.write(WicketResponseState.java:439)
      	at java.io.OutputStream.write(OutputStream.java:99)
      

      I think there should be used stream implementation that caches big data amounts on disk e.g. org.apache.cxf.io.CachedOutputStream

      Attachments

        Activity

          People

            Unassigned Unassigned
            apierzch Adam PierzchaƂa
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: