Uploaded image for project: 'Tika'
  1. Tika
  2. TIKA-2163

POIXMLException from ClassCastException on a valid Word template

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.13
    • 2.3.0
    • parser
    • None
    • Windows 7 x64, JVM 1.8.0_101

    Description

      On the attached Word template, which opens fine with Word, the Tika parser throws the following error:

      org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetException
      at org.apache.poi.POIXMLFactory.createDocumentPart(POIXMLFactory.java:65)
      at org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:601)
      at org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:613)
      at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:156)
      at org.apache.poi.xwpf.usermodel.XWPFDocument.<init>(XWPFDocument.java:124)
      at org.apache.poi.xwpf.extractor.XWPFWordExtractor.<init>(XWPFWordExtractor.java:58)
      at org.apache.poi.extractor.ExtractorFactory.createExtractor(ExtractorFactory.java:237)
      at org.apache.tika.parser.microsoft.ooxml.OOXMLExtractorFactory.parse(OOXMLExtractorFactory.java:86)
      at org.apache.tika.parser.microsoft.ooxml.OOXMLParser.parse(OOXMLParser.java:87)
      Caused by: java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
      at org.apache.poi.xwpf.usermodel.XWPFFactory.createDocumentPart(XWPFFactory.java:57)
      at org.apache.poi.POIXMLFactory.createDocumentPart(POIXMLFactory.java:60)
      ... 10 more
      Caused by: java.lang.ClassCastException: org.apache.poi.POIXMLDocumentPart cannot be cast to org.apache.poi.xwpf.usermodel.XWPFDocument
      at org.apache.poi.xwpf.usermodel.XWPFHeaderFooter.<init>(XWPFHeaderFooter.java:74)
      at org.apache.poi.xwpf.usermodel.XWPFHeader.<init>(XWPFHeader.java:54)
      ... 16 more

      Attachments

        1. ChronologicalResume.dotx
          58 kB
          Seva Alekseyev

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sevaa Seva Alekseyev
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: