DOCX support errors due to API incompatibilities
adamburkegh opened this issue · comments
Adam Burke commented
From the unit tests, loading some DOCX files causes runtime errors due to API incompatibilities.
$ mvn -DfailIfNoTests=false -Dtest=PlainTextFileReaderTest test -pl WoPeD-UnitTests -am -Dspotless.check.skip
Running org.woped.file.t2p.PlainTextFileReaderTest
Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.214 sec <<< FAILURE!
readDocx(org.woped.file.t2p.PlainTextFileReaderTest) Time elapsed: 0.714 sec <<< ERROR!
java.lang.NoSuchMethodError: 'org.apache.xmlbeans.XmlOptions org.apache.xmlbeans.XmlOptions.setEntityExpansionLimit(int)'
at org.apache.poi.ooxml.POIXMLTypeLoader.<clinit>(POIXMLTypeLoader.java:43)
at org.apache.poi.xwpf.usermodel.XWPFDocument.onDocumentRead(XWPFDocument.java:180)
at org.apache.poi.ooxml.POIXMLDocument.load(POIXMLDocument.java:184)
at org.apache.poi.xwpf.usermodel.XWPFDocument.<init>(XWPFDocument.java:138)
at org.woped.file.t2p.PlainTextFileReader.readTextFromWordDocumentX(PlainTextFileReader.java:183)
Don't know whether this code is still used, but it is either dead or buggy.