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

Error asking for a directory mime-type

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 1.5
    • Fix Version/s: None
    • Component/s: general
    • Labels:
      None
    • Environment:

      Windows 7 and JDK 1.8

      Description

      Hi there,

      just for curiosity I used the code you can find at the end of the "Content and language detection" page[1] to get the Tika mimetype for a directory.
      I tried on a well known directory (System.getProperty("user.home")) and I got:
      java.io.FileNotFoundException: C:\Users\2913 (Access is denied)
      at java.io.FileInputStream.open(Native Method) ~[na:1.8.0_11]
      at java.io.FileInputStream.<init>(FileInputStream.java:131) ~[na:1.8.0_11]
      at org.apache.tika.io.TikaInputStream.<init>(TikaInputStream.java:444) ~[tika-core-1.5.jar:na]
      at org.apache.tika.io.TikaInputStream.get(TikaInputStream.java:231) ~[tika-core-1.5.jar:na]
      at org.apache.tika.io.TikaInputStream.get(TikaInputStream.java:212) ~[tika-core-1.5.jar:na]

      Obviously the directory exists and it is readable.
      Is this the expected behaviour?

      Thanks
      Bye
      Piero

      [1]http://tika.apache.org/1.5/detection.html

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ottuzzi Piero Ottuzzi

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment