Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Workaround
-
1.15
Description
I got an XMLException when try to extract text from DOCX file (see attached file):
Caused by: org.apache.tika.exception.TikaException: Unexpected RuntimeException from org.apache.tika.parser.microsoft.ooxml.OOXMLParser@1de6e9d6 at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:282) at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280) ... 16 more Caused by: org.apache.poi.POIXMLException: org.apache.xmlbeans.XmlException: Element hdr@http://schemas.openxmlformats.org/wordprocessingml/2006/main is not a valid ftr@http://schemas.openxmlformats.org/wordprocessingml/2006/main document or a valid substitution. at org.apache.poi.xwpf.usermodel.XWPFFooter.onDocumentRead(XWPFFooter.java:121) at org.apache.poi.xwpf.usermodel.XWPFDocument.onDocumentRead(XWPFDocument.java:196) at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:190) at org.apache.poi.xwpf.usermodel.XWPFDocument.<init>(XWPFDocument.java:112) at org.apache.poi.xwpf.extractor.XWPFWordExtractor.<init>(XWPFWordExtractor.java:58) at org.apache.poi.extractor.ExtractorFactory.createExtractor(ExtractorFactory.java:232) at org.apache.tika.parser.microsoft.ooxml.OOXMLExtractorFactory.parse(OOXMLExtractorFactory.java:104) at org.apache.tika.parser.microsoft.ooxml.OOXMLParser.parse(OOXMLParser.java:106) at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280) ... 23 more Caused by: org.apache.xmlbeans.XmlException: Element hdr@http://schemas.openxmlformats.org/wordprocessingml/2006/main is not a valid ftr@http://schemas.openxmlformats.org/wordprocessingml/2006/main document or a valid substitution. at org.apache.xmlbeans.impl.store.Locale.autoTypeDocument(Locale.java:322) at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1384) at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1363) at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:370) at org.apache.poi.POIXMLTypeLoader.parse(POIXMLTypeLoader.java:144) at org.openxmlformats.schemas.wordprocessingml.x2006.main.FtrDocument$Factory.parse(Unknown Source) at org.apache.poi.xwpf.usermodel.XWPFFooter.onDocumentRead(XWPFFooter.java:96)
If I use OpenOffice, the text can be get sucessfully.
Attachments
Attachments
Issue Links
- is duplicated by
-
TIKA-3578 RuntimeException from org.apache.tika.parser.microsoft.ooxml.OOXMLParser
- Resolved