Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3567

File Upload fails for multiple clicks

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.1.8
    • Fix Version/s: 2.1.8
    • Component/s: None
    • Labels:
      None

      Description

      We are getting the following exception when we upload a document & click on "Submit" button multiple times quickly. We are setting request type to multipart & we have token interceptor in place to handle multiple submissions of the same request. However we have found out that the application fails even before reaching the first interceptor in interceptor stack. I suspect that the FileUploadBase class is trying to access the file input stream simultaneously in two threads causing the IOFileUploadException. In this case the token name & token value comes as null in first interceptor.

      This works properly when we don't upload any file & clicks "Submit" multiple times quickly.

      [1/26/11 22:48:00:844 EST] 00000732 Dispatcher I com.opensymphony.xwork2.util.logging.commons.CommonsLogger info Unable to find 'struts.multipart.saveDir' property setting. Defaulting to javax.servlet.context.tempdir
      [1/26/11 22:48:02:331 EST] 00000732 MultiPartRequ W com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn Unable to parse request
      org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. Async IO operation failed, reason: RC: 55 The specified network resource or device is no longer available.

      at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:367)
      at org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest.parse(JakartaMultiPartRequest.java:93)
      at org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper.<init>(MultiPartRequestWrapper.java:75)
      at org.apache.struts2.dispatcher.Dispatcher.wrapRequest(Dispatcher.java:708)
      at org.apache.struts2.dispatcher.FilterDispatcher.prepareDispatcherAndWrapRequest(FilterDispatcher.java:327)
      at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:367)
      at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
      at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
      at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
      at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:832)
      at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:742)
      at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:695)
      at com.ibm.ws.wswebcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:101)
      at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilters(DefaultExtensionProcessor.java:833)
      at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:771)
      at com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:113)
      at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3444)
      at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
      at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:815)
      at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)
      at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:119)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
      at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
      at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1818)
      at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
      at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
      at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
      at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
      at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
      at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
      at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
      Caused by: java.io.IOException: Async IO operation failed, reason: RC: 55 The specified network resource or device is no longer available.

      at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:671)
      ... 2 more

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              vnaik vinay naik
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: