How to handle java.io.IOException: Corrupt form data: premature ending occuring in com.oreilly.servlet.multipart.MultipartParser?
<p><strong>Environment</strong>: - Jboss EAP 6.3 Alpha 1</p>

<p><strong>JDK</strong>: - JDK 1.7 u_80 64 bit</p>

<p>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 <strong>"Corrupt form data: premature ending"</strong>. Following file is using in program <a href="http://central.maven.org/maven2/com/servlets/cos/05Nov2002/cos-05Nov2002.jar" rel="nofollow noreferrer">http://central.maven.org/maven2/com/servlets/cos/05Nov2002/cos-05Nov2002.jar</a></p>

<p>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)</p>

<p>On printing stack trace, we found following exception: - </p>

<pre><code>java.io.IOException: Corrupt form data: premature ending
       at com.oreilly.servlet.multipart.MultipartParser.&lt;init&gt;(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)
</code></pre>