Bug 65326

Summary: multiple warning log about accessExternalSchema
Product: POI Reporter: neo.wcng
Component: SXSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 5.0.0-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: All   

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]
.............
Comment 1 PJ Fanning 2021-10-08 16:16:25 UTC
this is benign - I've tried to relax the code so the logging won't happen (after v5.1.0 is released) - r1894032