You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2002/06/16 16:47:49 UTC

DO NOT REPLY [Bug 9902] New: - Struts Upload on WAS 4.0 : Premature end of stream while reading multipart request

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9902>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9902

Struts Upload on WAS 4.0 : Premature end of stream while reading multipart request 

           Summary: Struts Upload on WAS 4.0 : Premature end of stream while
                    reading multipart request
           Product: Struts
           Version: 1.0.2 Final
          Platform: All
               URL: None available
        OS/Version: All
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: File Upload
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: kenzo.hudelot@laposte.net


I'm using the Struts 1.0.2 : the WAR Upload example works fine on WSAD 4.0 (IBM 
WebSphere Studio Application Developper) but when I try to run it on WAS 4.0 
(IBM WebSphere Application Server - Advanced) I keep getting this I/O 
exception :


--------------------------------------------------------------------------------

Error Message: IOException while reading file element: Premature end of stream 
while reading multipart requestError Code: 500Target Servlet: nullError Stack: 
java.io.IOException: Premature end of stream while reading multipart 
request      at org.apache.struts.upload.MultipartIterator.createLocalFile
(MultipartIterator.java:520)      at 
org.apache.struts.upload.MultipartIterator.getNextElement
(MultipartIterator.java:217)      at 
org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest
(DiskMultipartRequestHandler.java:76)      at 
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735)      at 
org.apache.struts.action.ActionServlet.processPopulate
(ActionServlet.java:2061)      at org.apache.struts.action.ActionServlet.process
(ActionServlet.java:1564)      at org.apache.struts.action.ActionServlet.doPost
(ActionServlet.java:510)      at javax.servlet.http.HttpServlet.service
(HttpServlet.java:760)      at javax.servlet.http.HttpServlet.service
(HttpServlet.java:853) 

--------------------------------------------------------------------------------

I've figured out that the the problem comes from Struts trying to write a 
temporary file on the server (in the directory specified by java.io.tempDir)  : 
MultipartIterator.createLocalFile(...). The thing is Struts apparently can 
write the beginning of the file in the temporary directory (I've checked if it 
was actually created) but looses the I/O Stream before the end. It never does 
this under WSAD and always does it under WAS.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>