renderFile的时候报错

  1. [ERROR]-[Thread: http-bio-8080-exec-7]-[com.jfinal.core.ActionHandler.handle()]: /code/geturlimgone?ticket=7
  2. com.jfinal.render.RenderException: ClientAbortException:  java.net.SocketException: Connection reset by peer: socket write error
  3.     at com.jfinal.render.FileRender.normalRender(FileRender.java:116)
  4.     at com.jfinal.render.FileRender.render(FileRender.java:88)
  5.     at com.jfinal.core.ActionHandler.handle(ActionHandler.java:97)
  6.     at com.jfinal.ext.handler.ContextPathHandler.handle(ContextPathHandler.java:47)
  7.     at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72)
  8.     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
  9.     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  10.     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
  11.     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
  12.     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
  13.     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
  14.     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
  15.     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
  16.     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
  17.     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
  18.     at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
  19.     at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
  20.     at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
  21.     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
  22.     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  23.     at java.lang.Thread.run(Unknown Source)
  24. Caused by: ClientAbortException:  java.net.SocketException: Connection reset by peer: socket write error
  25.     at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:413)
  26.     at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:480)
  27.     at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:366)
  28.     at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:438)
  29.     at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:426)
  30.     at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:91)
  31.     at com.jfinal.render.FileRender.normalRender(FileRender.java:111)
  32.     ... 20 more
  33. Caused by: java.net.SocketException: Connection reset by peer: socket write error
  34.     at java.net.SocketOutputStream.socketWrite0(Native Method)
  35.     at java.net.SocketOutputStream.socketWrite(Unknown Source)
  36.     at java.net.SocketOutputStream.write(Unknown Source)
  37.     at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:215)
  38.     at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:480)
  39.     at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:366)
  40.     at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:240)
  41.     at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:84)
  42.     at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:192)
  43.     at org.apache.coyote.Response.doWrite(Response.java:520)
  44.     at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:408)
  45.     ... 26 more

下载本地F盘的一个文件都报这个错误,写法是:

renderFile(new File("F:\apache-tomcat-7.0.52\wtpwebapps\nx_msgadmin\temps\43.zip"));

请问这是什么问题?

评论区

w4ww

2016-11-29 14:38

比较奇怪的是前段时间使用正常,今天突然不能用了。

JFinal

2016-11-29 14:56

异常是ClientAbortException,这个是客户端下载到一半,主动关闭连接,属正常现象,不必理会

w4ww

2016-11-29 16:00

@JFinal 我自己测试下载的时候也不能下载下来是我这边浏览器原因?

w4ww

2016-11-29 16:05

@w4ww 多谢波总,换了个浏览器下载就成功了,这个比较奇怪。。。

热门反馈

扫码入社