Код: Выделить всё
private void writeWorkbookToResponse(XSSFWorkbook outputWorkbook, HttpServletResponse response) throws IOException {
try (OutputStream outputStream = response.getOutputStream();
BufferedOutputStream bos = new BufferedOutputStream(outputStream)) {
outputWorkbook.write(bos);
bos.flush();
}
}
< /code>
В успешном тесте я вижу эту ошибку в журналах: < /p>
SAX Feature unsupported [log suppressed for 5 minutes]http://javax.xml.XMLConstants/property/accessExternalSchema
java.lang.IllegalArgumentException: Property 'http://javax.xml.XMLConstants/property/accessExternalSchema' is not recognized.
at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.setAttribute(Unknown Source)
at com.ebay.raptor.xmlfactorywrapper.DocumentBuilderFactoryWrapper.setAttribute(DocumentBuilderFactoryWrapper.java:112)
at org.apache.poi.util.XMLHelper.trySet(XMLHelper.java:284)
at org.apache.poi.util.XMLHelper.getDocumentBuilderFactory(XMLHelper.java:114)
at org.apache.poi.util.XMLHelper.(XMLHelper.java:85)
at org.apache.poi.ooxml.util.DocumentHelper.newDocumentBuilder(DocumentHelper.java:47)
at org.apache.poi.ooxml.util.DocumentHelper.(DocumentHelper.java:36)
at org.apache.poi.openxml4j.opc.internal.ContentTypeManager.save(ContentTypeManager.java:429)
at org.apache.poi.openxml4j.opc.ZipPackage.saveImpl(ZipPackage.java:554)
at org.apache.poi.openxml4j.opc.OPCPackage.save(OPCPackage.java:1487)
at org.apache.poi.ooxml.POIXMLDocument.write(POIXMLDocument.java:227)
или это просто словесное сообщение, которое я могу игнорировать?>
Подробнее здесь: https://stackoverflow.com/questions/797 ... nsupported