关于jifinal后台安卓异步上传图片报错解决方案,有人知道怎么解决吗????


18-Nov-2019 08:28:51.636 严重 [http-nio-8080-exec-18] com.jfinal.core.ActionHandler.error /trans/uploadFileNew

java.lang.RuntimeException: org.apache.catalina.connector.ClientAbortException: java.io.EOFException: 套接字读取到意外的EOF

at com.jfinal.upload.MultipartRequest.wrapMultipartRequest(MultipartRequest.java:123)

at com.jfinal.upload.MultipartRequest.<init>(MultipartRequest.java:68)

at com.jfinal.core.Controller.getFiles(Controller.java:767)

at base.controller.TransInterfaceController.uploadFileNew(TransInterfaceController.java:492)

at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at com.jfinal.aop.Invocation.invoke(Invocation.java:73)

at com.jfinal.core.ActionHandler.handle(ActionHandler.java:74)

at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:526)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)

at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)

at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)

at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)

at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861)

at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1579)

at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.lang.Thread.run(Thread.java:745)

Caused by: org.apache.catalina.connector.ClientAbortException: java.io.EOFException: 套接字读取到意外的EOF

at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:340)

at org.apache.catalina.connector.InputBuffer.checkByteBufferEof(InputBuffer.java:632)

at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:362)

at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:132)

at com.oreilly.servlet.multipart.BufferedServletInputStream.fill(BufferedServletInputStream.java:64)

at com.oreilly.servlet.multipart.BufferedServletInputStream.readLine(BufferedServletInputStream.java:108)

at com.oreilly.servlet.multipart.LimitedServletInputStream.readLine(LimitedServletInputStream.java:60)

at com.oreilly.servlet.multipart.PartInputStream.fill(PartInputStream.java:97)

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:107)

... 28 more

Caused by: java.io.EOFException: 套接字读取到意外的EOF

at org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:743)

at org.apache.coyote.http11.Http11InputBuffer.access$300(Http11InputBuffer.java:41)

at org.apache.coyote.http11.Http11InputBuffer$SocketInputBuffer.doRead(Http11InputBuffer.java:1070)

at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:102)

at org.apache.coyote.http11.Http11InputBuffer.doRead(Http11InputBuffer.java:246)

at org.apache.coyote.Request.doRead(Request.java:551)

at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:336)

... 41 more

18-Nov-2019 08:28:55.296 严重 [http-nio-8080-exec-22] com.jfinal.core.ActionHandler.error /trans/uploadFileNew

java.lang.RuntimeException: org.apache.catalina.connector.ClientAbortException: java.io.EOFException: 套接字读取到意外的EOF

at com.jfinal.upload.MultipartRequest.wrapMultipartRequest(MultipartRequest.java:123)

at com.jfinal.upload.MultipartRequest.<init>(MultipartRequest.java:68)

at com.jfinal.core.Controller.getFiles(Controller.java:767)

at base.controller.TransInterfaceController.uploadFileNew(TransInterfaceController.java:492)

at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at com.jfinal.aop.Invocation.invoke(Invocation.java:73)

at com.jfinal.core.ActionHandler.handle(ActionHandler.java:74)

at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:526)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)

at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)

at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)

at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)

at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861)

at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1579)

at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.lang.Thread.run(Thread.java:745)

Caused by: org.apache.catalina.connector.ClientAbortException: java.io.EOFException: 套接字读取到意外的EOF

at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:340)

at org.apache.catalina.connector.InputBuffer.checkByteBufferEof(InputBuffer.java:632)

at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:362)

at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:132)

at com.oreilly.servlet.multipart.BufferedServletInputStream.fill(BufferedServletInputStream.java:64)

at com.oreilly.servlet.multipart.BufferedServletInputStream.readLine(BufferedServletInputStream.java:108)

at com.oreilly.servlet.multipart.LimitedServletInputStream.readLine(LimitedServletInputStream.java:60)

at com.oreilly.servlet.multipart.PartInputStream.fill(PartInputStream.java:97)

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:107)

... 28 more

Caused by: java.io.EOFException: 套接字读取到意外的EOF

at org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:743)

at org.apache.coyote.http11.Http11InputBuffer.access$300(Http11InputBuffer.java:41)

at org.apache.coyote.http11.Http11InputBuffer$SocketInputBuffer.doRead(Http11InputBuffer.java:1070)

at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:102)

at org.apache.coyote.http11.Http11InputBuffer.doRead(Http11InputBuffer.java:246)

at org.apache.coyote.Request.doRead(Request.java:551)

at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:336)

... 41 more


评论区

yuan_123

2019-11-19 11:25

@JFinal 我从toncat8 换成9还是有这个问题

yuan_123

2019-11-19 11:25

connectionTimeout="18000000"
redirectPort="8443" maxHttpHeaderSize="8192"
maxThreads="500"
minSpareThreads="100"
maxSpareThreads="300"
enableLookups="false"
acceptCount="200"
disableUploadTimeout="true"
URIEncoding="UTF-8"
compression="on"
compressionMinSize="2048"
noCompressionUserAgents="gozilla, traviata"
compressableMimeType="text/html,text/xml,application/javascript,text/css,text/plain"/>

yuan_123

2019-11-19 11:26

toncat链接时间已经很大了

JFinal

2019-11-19 11:55

@yuan_123 这个应该是纯客户端的问题,客户端发送文件时一定要遵守 http 规范

异常提示上传的数据格式不对,java.io.EOFException: 套接字读取到意外的EOF

热门分享

扫码入社