Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: The support homepage carousel is not displaying. We are working toward a resolution.

tOracleBulkExec and tOracleOutputBulkExec fail with a 'java.io.IOException: Cannot run program "sqlldr": error=2, No such file or directory' error

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
TalendSolutionExpert
Contributor II
Contributor II

tOracleBulkExec and tOracleOutputBulkExec fail with a 'java.io.IOException: Cannot run program "sqlldr": error=2, No such file or directory' error

Last Update:

Feb 9, 2024 1:22:49 PM

Updated By:

Jamie_Gregory

Created date:

Mar 18, 2023 9:43:51 AM

Talend Version      6.x 7.x 8.x

Summary

tOracleBulkExec and tOracleOutputBulkExec fail with the following error:

java.io.IOException: Cannot run program "sqlldr": error=2, No such file or directory
Additional Versions 
ProductTalend Data Integration
ComponentJobServer,Remote Engine
Problem Description

tOracleBulkExec and tOracleOutputBulkExec fail with the following error:

java.io.IOException: Cannot run program "sqlldr": error=2, No such file or directory
Problem root causePATH and ORACLE_HOME are not defined / not correctly set in the JobServer / Remote Engine process.
  1. To "dump" the environment variables defined in the JobServer / Remote Engine process, create a simple Job using a tJava component.
  2. Initialize the tJava component:

    1. In Basic settings, add the following:
      Map<String, String> env = System.getenv();
      for (String envName : env.keySet()) {
          System.out.format("%s=%s%n", envName, env.get(envName));
      }
    2. In Advanced settings, add the following:
      import java.util.Map;
  3. Run the Job to dump the environment variables.

NOTE : for the Cloud (Remote Engine) replace the line :

System.out.format("%s=%s%n", envName, env.get(envName));
by
context.output += ( envName + " = " + env.get(envName)  + "\n");
and display the context.output in the task log using a tJoblog

Execute the task in the Cloud with "Execution log level" set to Info

Solution or Workaround 
  1. Modify the script launching the JobServer / Remote Engine  start_rs.sh (JobServer/agent).

    1. Define ORACLE_HOME, for example:

      ORACLE_HOME=/apps/oracle/product/12.1.0/dbhome_1
      export $ORACLE_HOME
    2. Set the PATH to contain the directory where the sqlldr is stored:

      PATH=$ORACLE_HOME/bin:$PATH
      export $PATH

 

Notes:
I - You can set the variables PATH and ORACLE_HOME at the OS level too. For more information, see the Oracle documentation.

II - If the option "Run as" (user impersonation) is used , you'll need to update the file /etc/sudoers in order to add the lines :

Defaults env_keep += "ORACLE_HOME"
Defaults env_keep += "PATH"

III - For Remote Engine launched as a service , you'll need to set the variables in the file <Remote Engine Folder>\etc\Talend Remote Engine-wrapper.conf

Example :

set.default.ORACLE_HOME=/data/oracle/product/19.0.0/client_1
set.default.PATH=/data/oracle/product/19.0.0/client_1/bin%WRAPPER_PATH_SEPARATOR%%PATH%%WRAPPER_PATH_SEPARATOR%.

 

JIRA ticket number 
Version history
Last update:
‎2024-02-09 01:22 PM
Updated by: