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

posix_spawn is not a supported process launch mechanism on this platform

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.7
    • None
    • parser
    • MacOS X 10.10.2

    Description

      It could happen on some systems that posix_spawn is not a supported process launch mechanism.

      We are doing random testing which simulates different kind of Locale so I could sometime hit that issue:

      java.lang.Error: posix_spawn is not a supported process launch mechanism on this platform.
      	at java.lang.UNIXProcess$1.run(UNIXProcess.java:104)
      	at java.lang.UNIXProcess$1.run(UNIXProcess.java:93)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.lang.UNIXProcess.<clinit>(UNIXProcess.java:91)
      	at java.lang.ProcessImpl.start(ProcessImpl.java:130)
      	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
      	at java.lang.Runtime.exec(Runtime.java:617)
      	at java.lang.Runtime.exec(Runtime.java:485)
      	at org.apache.tika.parser.external.ExternalParser.check(ExternalParser.java:344)
      	at org.apache.tika.parser.ocr.TesseractOCRParser.hasTesseract(TesseractOCRParser.java:117)
      	at org.apache.tika.parser.ocr.TesseractOCRParser.getSupportedTypes(TesseractOCRParser.java:90)
      	at org.apache.tika.parser.CompositeParser.getParsers(CompositeParser.java:81)
      	at org.apache.tika.parser.DefaultParser.getParsers(DefaultParser.java:95)
      	at org.apache.tika.parser.CompositeParser.getSupportedTypes(CompositeParser.java:229)
      	at org.apache.tika.parser.CompositeParser.getParsers(CompositeParser.java:81)
      	at org.apache.tika.parser.CompositeParser.getParser(CompositeParser.java:209)
      	at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:244)
      	at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:120)
      	at org.apache.tika.Tika.parseToString(Tika.java:506)
      

      It sounds like it's related to this: http://java.thedizzyheights.com/2014/07/java-error-posix_spawn-is-not-a-supported-process-launch-mechanism-on-this-platform-when-trying-to-spawn-a-process/

      Though I have hard time to reproduce it!

      BTW I wonder if we could add a setting which can return false for TesseractOCRParser#hasTesseract even if we have tesseract available.

      For example, let say that my machine shares multiple application and for one of them I don't want any OCR on my documents.

      Hope this helps.
      Let me know if you need more details.

      Attachments

        Activity

          People

            tpalsulich Tyler Bui-Palsulich
            dadoonet David Pilato
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: