[
https://issues.apache.org/jira/browse/FILEUPLOAD-259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14207077#comment-14207077
]
Thomas Neidhart commented on FILEUPLOAD-259:
--------------------------------------------
This is impossible to reproduce without further information.
Please attach a test case including the actual content to be processed.
It looks like you use struts2 and I have made a simple test case myself with
the latest struts2 release (2.3.16.3) and everything seems to work fine.
> Creating MultiPartRequestWrapper throws java.lang.StackOverflowError
> --------------------------------------------------------------------
>
> Key: FILEUPLOAD-259
> URL: https://issues.apache.org/jira/browse/FILEUPLOAD-259
> Project: Commons FileUpload
> Issue Type: Bug
> Affects Versions: 1.3.1
> Reporter: Gary M.
>
> We have unit tests that will create a new MultiPartRequestWrapper. Here is a
> code snippet of this:
> MockHttpServletRequest req = new MockHttpServletRequest();
> // Set request body to HTTP servlet request:
> req.setContent(requestContent.toByteArray());
> // Set content type to HTTP servlet request (important, includes Mime
> boundary string):
> req.setContentType(multipartRequestEntity.getContentType());
> LocaleProvider localeProvider = new DefaultLocaleProvider();
> JakartaMultiPartRequest jak = new JakartaMultiPartRequest();
> jak.setMaxSize(String.valueOf(2000));
> File tempDir = new File(TEMP_DIR);
> if (!tempDir.exists()) {
> tempDir.mkdirs();
> }
> return new MultiPartRequestWrapper(jak, req, tempDir.getAbsolutePath(),
> localeProvider);
> When the "return..." statement runs, seconds later the unit tests fail and we
> see the following in the unit test console:
> java.lang.StackOverflowError
> at org.apache.commons.io.IOUtils.closeQuietly(IOUtils.java:60)
> at org.apache.commons.io.IOUtils.closeQuietly(IOUtils.java:60)
> at org.apache.commons.io.IOUtils.closeQuietly(IOUtils.java:60)
> etc,etc,etc. (hundreds of times)
> This behavior does not happen with a prior version of commons-fiileupload.
> We only see this with version 1.3.1.
> Please advise and thank you in advance for your attention on this issue.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)