jfinal启动报错,百度上的答案千篇一律。

[ERROR]-[Thread: http-bio-8080-exec-2]-[com.jfinal.core.ActionHandler.handle()]: /
com.jfinal.render.RenderException: java.lang.RuntimeException: ClientAbortException:  java.net.SocketException: Broken pipe
	at com.jfinal.render.TemplateRender.render(TemplateRender.java:62)
	at com.jfinal.core.ActionHandler.handle(ActionHandler.java:108)
	at com.jfinal.ext.handler.ContextPathHandler.handle(ContextPathHandler.java:48)
	at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:73)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: ClientAbortException:  java.net.SocketException: Broken pipe
	at com.jfinal.template.io.ByteWriter.close(ByteWriter.java:54)
	at com.jfinal.template.Template.render(Template.java:57)
	at com.jfinal.render.TemplateRender.render(TemplateRender.java:60)
	... 19 more
Caused by: ClientAbortException:  java.net.SocketException: Broken pipe
	at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:388)
	at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:462)
	at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:334)
	at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:306)
	at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:101)
	at com.jfinal.template.io.ByteWriter.close(ByteWriter.java:51)
	... 21 more
Caused by: java.net.SocketException: Broken pipe
	at java.net.SocketOutputStream.socketWrite0(Native Method)
	at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
	at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
	at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:215)
	at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:462)
	at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:366)
	at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:240)
	at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:119)
	at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:192)
	at org.apache.coyote.Response.doWrite(Response.java:505)
	at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:383)
	... 26 more

找不到原因

评论区

JFinal

2018-02-04 11:33

你在碰到这个异常时项目的使用是否正常?

ClientAbortException 是客户端中途断开请求,通常是不需要理会的,jfinal 3.4 已经添加了额外的处理代码

陈伟

2018-02-04 12:10

波总,这个不影响项目正常使用

JFinal

2018-02-04 14:04

@陈伟 客户端请求到一半时断开请求引发的,也可能是你的机器装了 nginx 这类反向代理的配置造成的,一般不影响使用

陈伟

2018-02-07 11:21

@JFinal 启动时报错,看起来有点丑,可以解决吗?

JFinal

2018-02-07 11:58

@陈伟 jfinal 3.4 已经处理过, 这个问题本质不是 jfinal 要解决的,报出这个异常是正确的

热门反馈

扫码入社