Tika
  1. Tika
  2. TIKA-705

Valid OOXML PPT file hits InvalidFormatException thrown in POI

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9
    • Fix Version/s: 1.0
    • Component/s: parser
    • Labels:
      None

      Description

      I took the "testRTFVarious.rtf" test case from TIKA-683, and saved it as various other doc types, to generate more test cases.

      But when I did this for PPTX, the resulting file hits this exception:

      Exception in thread "main" org.apache.tika.exception.TikaException: Broken OOXML file
      	at org.apache.tika.parser.microsoft.ooxml.AbstractOOXMLExtractor.handleEmbeddedParts(AbstractOOXMLExtractor.java:141)
      	at org.apache.tika.parser.microsoft.ooxml.AbstractOOXMLExtractor.getXHTML(AbstractOOXMLExtractor.java:112)
      	at org.apache.tika.parser.microsoft.ooxml.OOXMLExtractorFactory.parse(OOXMLExtractorFactory.java:95)
      	at org.apache.tika.parser.microsoft.ooxml.OOXMLParser.parse(OOXMLParser.java:70)
      	at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:242)
      	at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:242)
      	at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:129)
      	at org.apache.tika.cli.TikaCLI$OutputType.process(TikaCLI.java:126)
      	at org.apache.tika.cli.TikaCLI.process(TikaCLI.java:363)
      	at org.apache.tika.cli.TikaCLI.main(TikaCLI.java:97)
      Caused by: org.apache.poi.openxml4j.exceptions.InvalidFormatException: A segment shall not hold any characters other than pchar characters. [M1.6]
      	at org.apache.poi.openxml4j.opc.PackagePartName.checkPCharCompliance(PackagePartName.java:370)
      	at org.apache.poi.openxml4j.opc.PackagePartName.throwExceptionIfPartNameHaveInvalidSegments(PackagePartName.java:270)
      	at org.apache.poi.openxml4j.opc.PackagePartName.throwExceptionIfInvalidPartUri(PackagePartName.java:185)
      	at org.apache.poi.openxml4j.opc.PackagePartName.<init>(PackagePartName.java:83)
      	at org.apache.poi.openxml4j.opc.PackagingURIHelper.createPartName(PackagingURIHelper.java:490)
      	at org.apache.tika.parser.microsoft.ooxml.AbstractOOXMLExtractor.handleEmbeddedParts(AbstractOOXMLExtractor.java:124)
      	... 9 more
      

      All I did was open Office 2007, copy/paste over the text from the Word doc, and save it. Ie, it should be a valid OOXML file, unless Office 2007 is buggy?

      1. testPPT_various.pptx
        47 kB
        Michael McCandless

        Activity

        Michael McCandless made changes -
        Fix Version/s 1.0 [ 12317967 ]
        Michael McCandless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Jukka Zitting made changes -
        Fix Version/s 0.10 [ 12313535 ]
        Michael McCandless made changes -
        Fix Version/s 1.0 [ 12313535 ]
        Affects Version/s 0.9 [ 12315488 ]
        Component/s parser [ 12312047 ]
        Michael McCandless made changes -
        Field Original Value New Value
        Attachment testPPT_various.pptx [ 12493031 ]
        Michael McCandless created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Michael McCandless
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development