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

InvalidFormatException on a valid Word file

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.13
    • Fix Version/s: 2.0, 1.15
    • Component/s: parser
    • Labels:
      None
    • Environment:

      Windows 7 x64, JVM 1.8.0_101

      Description

      On the attached Word file, which opens fine with Word, the Tika parser throws the following exception:

      org.apache.tika.exception.TikaException: Error creating OOXML extractor
      at org.apache.tika.parser.microsoft.ooxml.OOXMLExtractorFactory.parse(OOXMLExtractorFactory.java:120)
      at org.apache.tika.parser.microsoft.ooxml.OOXMLParser.parse(OOXMLParser.java:87)
      Caused by: java.lang.IllegalArgumentException: Date for created could not be parsed: 2015-07-27
      at org.apache.poi.openxml4j.opc.internal.PackagePropertiesPart.setCreatedProperty(PackagePropertiesPart.java:408)
      at org.apache.poi.openxml4j.opc.internal.unmarshallers.PackagePropertiesUnmarshaller.unmarshall(PackagePropertiesUnmarshaller.java:124)
      at org.apache.poi.openxml4j.opc.OPCPackage.getParts(OPCPackage.java:743)
      at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:230)
      at org.apache.tika.parser.microsoft.ooxml.OOXMLExtractorFactory.parse(OOXMLExtractorFactory.java:69)
      ... 3 more
      Caused by: org.apache.poi.openxml4j.exceptions.InvalidFormatException: Date 2015-07-27 not well formatted, expected format in: yyyy-MM-dd'T'HH:mm:ssz, yyyy-MM-dd'T'HH:mm:ss.SSSz, yyyy-MM-dd'T'HH:mm:ss'Z', yyyy-MM-dd'T'HH:mm:ss.SS'Z'
      at org.apache.poi.openxml4j.opc.internal.PackagePropertiesPart.setDateValue(PackagePropertiesPart.java:615)
      at org.apache.poi.openxml4j.opc.internal.PackagePropertiesPart.setCreatedProperty(PackagePropertiesPart.java:406)
      ... 7 more

        Attachments

        1. safety_analysis_report_FINAL2.docx
          55 kB
          Seva Alekseyev

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                sevaa Seva Alekseyev
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: