[ 
https://issues.apache.org/jira/browse/WICKET-4113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13134057#comment-13134057
 ] 

Adam Pierzchała commented on WICKET-4113:
-----------------------------------------

Actually, I've already made workaround using reflection api (not nice, but 
works...) to overcome ApplicationHttpResponse wrapper. If you still want to 
work on this issue, I can provide small app, but because my project is quite 
big, and have complicated configuration, it will take me some time to create 
simple app that will have similar bug... so I can try to provide it next week 
but no guarantees. Anyway, it is not critial for me anymore since workaround :)
                
> Whole response is cached in memory
> ----------------------------------
>
>                 Key: WICKET-4113
>                 URL: https://issues.apache.org/jira/browse/WICKET-4113
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.18
>            Reporter: Adam Pierzchała
>            Priority: Critical
>
> 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:
> {noformat}
> 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)
> {noformat}
> I think there should be used stream implementation that caches big data 
> amounts on disk e.g. {{org.apache.cxf.io.CachedOutputStream}}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to