Bug 65326 - multiple warning log about accessExternalSchema
Summary: multiple warning log about accessExternalSchema
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: SXSSF (show other bugs)
Version: 5.0.0-FINAL
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-24 16:01 UTC by neo.wcng
Modified: 2021-05-24 16:01 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description neo.wcng 2021-05-24 16:01:35 UTC
we migrated our custom application from POI v4.1.2 to v5.0.0,
and we are running on openjdk 11.0.10
we do not include any Xerces lib manually in the project (i.e. using the default jdk11 xml processor)

everytime it write an excel file, the following warn log will be triggered
but the output excel files seems fine in the MS Office
can this error message be ignored? or there is missing configuration?

the default jdk11 seems does not support the reuqired accessExternalSchema
https://github.com/AdoptOpenJDK/openjdk-jdk11/blob/master/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/XMLSecurityPropertyManager.java#L42

the caller code from POI
https://github.com/apache/poi/blob/trunk/poi/src/main/java/org/apache/poi/util/XMLHelper.java#L225


2021-05-24 23:52:11.891 [main] WARN  org.apache.poi.util.XMLHelper._log - SAX Feature unsupported [log suppressed for 5 minutes]http://javax.xml.XMLConstants/property/accessExternalSchema
java.lang.IllegalArgumentException: TransformerFactory does not recognise attribute 'http://javax.xml.XMLConstants/property/accessExternalSchema'.
	at java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.setAttribute(TransformerFactoryImpl.java:526) ~[na:na]
	at org.apache.poi.util.XMLHelper.trySet(XMLHelper.java:280) ~[poi-5.0.0.jar:5.0.0]
	at org.apache.poi.util.XMLHelper.getTransformerFactory(XMLHelper.java:222) ~[poi-5.0.0.jar:5.0.0]
	at org.apache.poi.util.XMLHelper.newTransformer(XMLHelper.java:227) ~[poi-5.0.0.jar:5.0.0]
	at org.apache.poi.openxml4j.opc.StreamHelper.saveXmlInStream(StreamHelper.java:56) ~[poi-ooxml-5.0.0.jar:5.0.0]
	at org.apache.poi.openxml4j.opc.internal.ZipContentTypeManager.saveImpl(ZipContentTypeManager.java:69) ~[poi-ooxml-5.0.0.jar:5.0.0]
	at org.apache.poi.openxml4j.opc.internal.ContentTypeManager.save(ContentTypeManager.java:452) ~[poi-ooxml-5.0.0.jar:5.0.0]
	at org.apache.poi.openxml4j.opc.ZipPackage.saveImpl(ZipPackage.java:520) ~[poi-ooxml-5.0.0.jar:5.0.0]
	at org.apache.poi.openxml4j.opc.OPCPackage.save(OPCPackage.java:1514) ~[poi-ooxml-5.0.0.jar:5.0.0]
	at org.apache.poi.ooxml.POIXMLDocument.write(POIXMLDocument.java:227) ~[poi-ooxml-5.0.0.jar:5.0.0]
	at org.apache.poi.xssf.streaming.SXSSFWorkbook.write(SXSSFWorkbook.java:965) ~[poi-ooxml-5.0.0.jar:5.0.0]
.............