Here is the steps i have done to reproduce this problem.
- Use the UNIX command 'mkfile 3g big-test-file.bin' to create an empty but large file to upload.
- Use the following code snippet : (Assuming more 'reasonable' file sizes work)
Code: Select all
<p:fileUpload mode="advanced" multiple="true" fileUploadListener="#{attachmentController.handleAttachmentUpdate}" label="Add Attachment" update="messages" auto="true" /> <p:growl id="messages" showDetail="true"/>
- Upload the file using the respective web page and it results in the following exception on the server side with no client side indication that something bad happened.
SEVERE: Servlet.service() for servlet [Faces Servlet] in context with path [/web-app] threw exception
java.io.IOException: Processing of multipart/form-data request failed. Stream ended unexpectedly
at org.primefaces.webapp.MultipartRequest.parseRequest(MultipartRequest.java:69)
at org.primefaces.webapp.MultipartRequest.<init>(MultipartRequest.java:51)
at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:72)
Please advise.