开发者社区> 问答> 正文

JFinal上传图片出现unexpected end of part报错是什么原因??报错

java.lang.RuntimeException: java.io.IOException: unexpected end of part
 at com.jfinal.upload.MultipartRequest.wrapMultipartRequest(MultipartRequest.java:117)
 at com.jfinal.upload.MultipartRequest.<init>(MultipartRequest.java:68)
 at com.jfinal.core.Controller.getFiles(Controller.java:699)
 at com.demo.validator.UploadValidator.validate(UploadValidator.java:16)
 at com.jfinal.validate.Validator.intercept(Validator.java:66)
 at com.jfinal.aop.Invocation.invoke(Invocation.java:65)
 at com.jfinal.core.ActionHandler.handle(ActionHandler.java:74)
 at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72)
 at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)
 at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)
 at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
 at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:560)
 at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
 at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)
 at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)
 at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
 at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)
 at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
 at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
 at org.eclipse.jetty.server.Server.handle(Server.java:365)
 at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)
 at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:937)
 at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:998)
 at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:856)
 at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
 at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
 at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
 at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
 at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
 at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
 at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: unexpected end of part
 at com.oreilly.servlet.multipart.PartInputStream.fill(PartInputStream.java:100)
 at com.oreilly.servlet.multipart.PartInputStream.read(PartInputStream.java:195)
 at com.oreilly.servlet.multipart.PartInputStream.read(PartInputStream.java:156)
 at com.oreilly.servlet.multipart.FilePart.write(FilePart.java:208)
 at com.oreilly.servlet.multipart.FilePart.writeTo(FilePart.java:167)
 at com.oreilly.servlet.MultipartRequest.<init>(MultipartRequest.java:271)
 at com.jfinal.upload.MultipartRequest.wrapMultipartRequest(MultipartRequest.java:101)
 ... 30 more

展开
收起
爱吃鱼的程序员 2020-06-12 15:28:06 886 0
2 条回答
写回答
取消 提交回答
  • 我也遇到同样问题,请问解决了吗

    2020-11-20 14:27:23
    赞同 展开评论 打赏
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    遇到同样的问题,求解答。。

    2020-06-12 15:28:22
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
OPEN SOURCE IN A DATA-DRIVEN WORLD 立即下载
Apache Wicket User Guide - Ref 立即下载
Well-That-Escalated-Quickly-How-Abusing-The-Docker-API-Led-To-Remote-Code-Execution-Same-Origin-Bypass-And-Persistence 立即下载