multipart.MultipartException:无法解析多部分servlet请求+ FileUploadException:连接已关闭:读取失败

时间:2017-06-12 06:56:04

标签: spring jsp websphere

我正在开发一个spring应用程序,它将上传的文件放在服务器路径中并更新表中的详细信息。但是在上传文件时收到错误,

[ERROR   ] SRVE0777E: Exception thrown by application class 

'org.springframework.web.servlet.FrameworkServlet.processRequest:948'
org.springframework.web.util.NestedServletException: 

Request processing failed; nested exception is org.springframework.web.multipart.MultipartException: Could not parse multipart servlet request; nested exception is 

org.apache.commons.fileupload.FileUploadException: Connection closed: Read failed.  Possible end of stream encountered. 
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:948)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at [internal classes]
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at [internal classes]
    at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:207)
    at [internal classes]

我的控制器方法如下

@RequestMapping(params = "action=uploadfile", method = RequestMethod.POST) 
public ModelAndView uploadParameters(@ModelAttribute("uploadParametersForm") 
UploadParameterFormBean uploadParamForm, HttpServletRequest request, 
HttpServletResponse response) { 
ModelAndView modelAndView = null; 
modelAndView = buildModelAndView(request, uploadParamForm); 
FulfillmentParameterService parameterService = 
parameterServiceFactory.getParameterServiceObj(uploadParamFo‌​
rm.getParamType()); parameterService.uploadParameters(uploadParamForm); 
return modelAndView; 
}

0 个答案:

没有答案