NutzCN Logo
问答 后端反回二进制的图片tomcat一直报错
发布于 2876天前 作者 wsljsj 1737 次浏览 复制 上一个帖子 下一个帖子
标签:

@At
@Ok("raw")
Blob imgBlob = (Blob) zws.get(i).get("zwwystx");
if (imgBlob == null) {//不确定指纹图片会为空
return null;
}
return imgBlob.getBinaryStream();

系统异常,错误信息:org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
java.lang.RuntimeException: org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
at org.cox.lang.Lang.wrapThrow(Lang.java:182)
at org.cox.lang.Streams.writeAndClose(Streams.java:165)
at org.cox.mvc.view.RawView.render(RawView.java:184)
at org.cox.mvc.impl.processor.ViewProcessor.process(ViewProcessor.java:66)
at org.cox.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.cox.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:28)
at org.cox.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.cox.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:33)
at org.cox.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.cox.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:58)
at org.cox.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.cox.integration.shiro.NutShiroProcessor.process(NutShiroProcessor.java:52)
at org.cox.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.cox.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:123)
at org.cox.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.cox.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
at org.cox.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.cox.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
at org.cox.mvc.impl.NutActionChain.doChain(NutActionChain.java:44)
at org.cox.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
at org.cox.mvc.ActionHandler.handle(ActionHandler.java:31)
at org.cox.mvc.NutFilter.doFilter(NutFilter.java:198)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1502)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1458)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1143)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:618)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:785)
Caused by: org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:393)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:315)
at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:418)
at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:406)
at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:97)
at org.cox.lang.Streams.write(Streams.java:135)
at org.cox.lang.Streams.write(Streams.java:107)
at org.cox.lang.Streams.writeAndClose(Streams.java:162)
... 49 more
Caused by: java.io.IOException: Broken pipe
at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:59)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:105)
at sun.nio.ch.IOUtil.write(IOUtil.java:77)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:485)
at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:124)
at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:172)
at org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:139)
at org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:197)
at org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:41)
at org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:320)
at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:93)
at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:256)
at org.apache.coyote.Response.doWrite(Response.java:501)
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:388)
... 56 more

1 回复

先读成byte[]再返回,试试

添加回复
请先登陆
回到顶部