简体   繁体   中英

How to handle java.io.IOException: Corrupt form data: premature ending occuring in com.oreilly.servlet.multipart.MultipartParser?

Environment : - Jboss EAP 6.3 Alpha 1

JDK : - JDK 1.7 u_80 64 bit

We have a program functionality which is absolutely working fine in JDK 1.6 u_32 64 bit. Once we upgraded it to JDK 1.7 u_80 64 bit, it started throwing exception message "Corrupt form data: premature ending" . Following file is using in program http://central.maven.org/maven2/com/servlets/cos/05Nov2002/cos-05Nov2002.jar

It is quiet critical to find cause and solution of the problem because problem is varying in JDK 1.6 u_32 64 bit and JDK 1.7 u_80 64 bit. But from the trace, it seems that problem clearly belongs to com.oreilly.servlet.multipart.MultipartParser.(MultipartParser.java:205)

On printing stack trace, we found following exception: -

java.io.IOException: Corrupt form data: premature ending
       at com.oreilly.servlet.multipart.MultipartParser.<init>(MultipartParser.java:205)
       at org.apache.jsp.webaccess.configurations.adddocument.closeadddoc_jsp._jspService(closeadddoc_jsp.java:995)
       at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:69)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
       at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:365)
       at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:309)
       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:242)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
MultipartRequest multi = new MultipartRequest(request, "C:\\Users\\HP\\workspace\\Project_OnlineExa\\WebContent"); 

应该是Servlet的第一行

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM