Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Incomplete
-
1.4.18
-
None
-
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