A Job is designed with multiple subJobs. If a tparallelize component is used and the subJob property Use an independent process to run subJob is selected, the Job fails with the following error.
Exception in component tRunJob_3 java.io.IOException: Cannot run program "java": error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at java.lang.Runtime.exec(Runtime.java:620) at java.lang.Runtime.exec(Runtime.java:485) at bda_prod.bmstgcap_main_initial_0_1.BMSTGCAP_Main_Initial.tRunJob_3Process(BMSTGCAP_Main_Initial.java:4155) at bda_prod.bmstgcap_main_initial_0_1.BMSTGCAP_Main_Initial$4.run(BMSTGCAP_Main_Initial.java:2043) 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) ... 4 more
The following stack trace appears in the Job log, and this helps isolate the issue:
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)
The UNIX process is forking the Java, but the Java file is not available. The Java processBuilder class is used to create operating system processes for this Talend Job. The processBuilder looks for Java in /usr/bin/java on UNIX/Linux, and doesn't use the locations in environment variables like PATH or JAVA_HOME. When executing /usr/bin/java from the runtime server, the Java command failed to execute.
To fix the issue, create a symbolic link for the java executable at /usr/bin/java and run the Job.