tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TIKA-2753) ChildProcess does not use the JAVA_HOME
Date Fri, 12 Oct 2018 16:35:00 GMT

    [ https://issues.apache.org/jira/browse/TIKA-2753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16648095#comment-16648095

Hudson commented on TIKA-2753:

UNSTABLE: Integrated in Jenkins build tika-2.x-windows #332 (See [https://builds.apache.org/job/tika-2.x-windows/332/])
TIKA-2753 -- use -javaHome or $JAVA_HOME when starting child process w (tallison: rev d6dd1b2a169500fc0452d2f7ec2a54ba3d31381a)
* (edit) tika-core/src/main/java/org/apache/tika/utils/ProcessUtils.java
* (edit) CHANGES.txt
* (edit) tika-server/src/main/java/org/apache/tika/server/TikaServerCli.java
* (edit) tika-server/src/main/java/org/apache/tika/server/TikaServerWatchDog.java

> ChildProcess does not use the JAVA_HOME
> ---------------------------------------
>                 Key: TIKA-2753
>                 URL: https://issues.apache.org/jira/browse/TIKA-2753
>             Project: Tika
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 1.19.1
>            Reporter: Julien Massiera
>            Assignee: Tim Allison
>            Priority: Critical
> If the user starting the Tika Server does not have the path to java configured in its
PATH var, the following error appears in the logs :
> java.io.IOException: Cannot run program "java": error=2, No such file or directory
>     at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
>     at org.apache.tika.server.TikaServerWatchDog$ChildProcess.startProcess(TikaServerWatchDog.java:224)
>     at org.apache.tika.server.TikaServerWatchDog$ChildProcess.<init>(TikaServerWatchDog.java:149)
>     at org.apache.tika.server.TikaServerWatchDog$ChildProcess.<init>(TikaServerWatchDog.java:139)
>     at org.apache.tika.server.TikaServerWatchDog.execute(TikaServerWatchDog.java:87)
>     at org.apache.tika.server.TikaServerCli.execute(TikaServerCli.java:136)
>     at org.apache.tika.server.TikaServerCli.main(TikaServerCli.java:117)
> Caused by: java.io.IOException: error=2, No such file or directory
>     at java.lang.UNIXProcess.forkAndExec(Native Method)
>     at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
>     at java.lang.ProcessImpl.start(ProcessImpl.java:134)
>     at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
>     ... 6 more
> By checking the TikaServerWatchDog class I noticed that the startProcess method of the
ChildProcess private class is using the 'java' argument. As my user only have the JAVA_HOME
configured in its /etc/profile and not the path to java, this explains the error.
> It would be better if the startProcess relies on the JAVA_HOME env var to use java instead
of assuming that the java program is configured in the PATH env var of the user.

This message was sent by Atlassian JIRA

View raw message