I tried to generate word(.doc) file by using org.apache.poi and spring mvc. But there was an error occurred:
jetty ErrorLogMappingExceptionResolver Closed java.io.IOException: Closed")
when controller returned, and the word(.doc) file could export successfully.
This exception is in org.eclipse.jetty.server.HttpOutput.write() after file has generated, and jetty invoked HttpOutput.write again lead to excepiton?
related code:
HttpServletResponse response;
OutputStream outputStream = response.getOutputStream();
XWPFDocument xWPFDocument = new XWPFDocument();
xWPFDocument.write(outputStream);
outputStream.flush();
outputStream.close();
error log :
jetty ErrorLogMappingExceptionResolver Closed java.io.IOException: Closed
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:140) ~[jetty-all-8.1.10.v20130312.jar:8.1.10.v20130312]
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:107) ~[jetty-all-8.1.10.v20130312.jar:8.1.10.v20130312]
at com.opensymphony.module.sitemesh.filter.RoutableServletOutputStream.write(RoutableServletOutputStream.java:118) ~[sitemesh-2.4.2.jar:?]
at com.fasterxml.jackson.core.json.UTF8JsonGenerator._flushBuffer(UTF8JsonGenerator.java:2085) ~[jackson-core-2.9.3.jar:2.9.3]
at com.fasterxml.jackson.core.json.UTF8JsonGenerator.flush(UTF8JsonGenerator.java:1097) ~[jackson-core-2.9.3.jar:2.9.3]
at com.fasterxml.jackson.databind.ObjectWriter.writeValue(ObjectWriter.java:915) ~[jackson-databind-2.9.3.jar:2.9.3]