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

RuntimeException on extracting text from Word 97-2004 Document

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.9
    • Fix Version/s: None
    • Component/s: parser
    • Labels:
      None

      Description

      Extracting text from the Word 97-2004 document attached here fails with the following stacktrace:

      $ java -jar /tika-app/target/tika-app-1.9-SNAPSHOT.jar --text 1534-attachment.doc
      Exception in thread "main" org.apache.tika.exception.TikaException: Unexpected RuntimeException from org.apache.tika.parser.microsoft.OfficeParser@69af0db6
      at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:283)
      at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:281)
      at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:120)
      at org.apache.tika.cli.TikaCLI$OutputType.process(TikaCLI.java:180)
      at org.apache.tika.cli.TikaCLI.process(TikaCLI.java:477)
      at org.apache.tika.cli.TikaCLI.main(TikaCLI.java:134)
      Caused by: java.lang.ArrayIndexOutOfBoundsException
      at java.lang.System.arraycopy(Native Method)
      at org.apache.poi.hwpf.model.PAPFormattedDiskPage.getGrpprl(PAPFormattedDiskPage.java:171)
      at org.apache.poi.hwpf.model.PAPFormattedDiskPage.<init>(PAPFormattedDiskPage.java:101)
      at org.apache.poi.hwpf.model.OldPAPBinTable.<init>(OldPAPBinTable.java:49)
      at org.apache.poi.hwpf.HWPFOldDocument.<init>(HWPFOldDocument.java:109)
      at org.apache.tika.parser.microsoft.WordExtractor.parseWord6(WordExtractor.java:532)
      at org.apache.tika.parser.microsoft.WordExtractor.parse(WordExtractor.java:84)
      at org.apache.tika.parser.microsoft.OfficeParser.parse(OfficeParser.java:201)
      at org.apache.tika.parser.microsoft.OfficeParser.parse(OfficeParser.java:172)
      at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:281)
      ... 5 more

      I'm using trunk from Github, which I think is a flavor of 1.9. The document opens properly in Word for Mac '11.

      Happy to answer questions; I'm also on the "user" mailing list. If it's relevant, I'm on java 1.7.0_55... (Also let me know if there's a way to put that document here in Jira rather than on my own dropbox.)

        Attachments

        1. 1534-attachment.doc
          8 kB
          Jeremy B. Merrill

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jeremybmerrill Jeremy B. Merrill
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: