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

tika-app --server --detect fails with "mark/reset not supported"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5
    • 1.5
    • cli, detector
    • None

    Description

      If you try running the Tika App in detect server mode, eg with "--server --detect", then your detection will fail with exceptions like:

      java.io.IOException: mark/reset not supported
      at java.io.InputStream.reset(InputStream.java:347)
      at org.apache.tika.parser.microsoft.POIFSContainerDetector.detect(POIFSContainerDetector.java:158)
      at org.apache.tika.detect.CompositeDetector.detect(CompositeDetector.java:61)
      at org.apache.tika.cli.TikaCLI$10.process(TikaCLI.java:252)
      at org.apache.tika.cli.TikaCLI$TikaServer$1.run(TikaCLI.java:803)

      I'm not sure if this is a problem with the detector, or if it's a problem with the Tika CLI calling the wrong detector / not doing any buffering

      Since detection works best when the stream is rewindable, so that container detectors can work, I think we should probably change the Tika CLI Server to buffer into a TikaInputStream for detection. Not sure if there's a downside to this though?

      Attachments

        Activity

          People

            Unassigned Unassigned
            nick Nick Burch
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: