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

Talend Version       6.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  
Product Talend Data Integration
Component JobServer
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 cause PATH and ORACLE_HOME are not defined in the JobServer process.
Solution or Workaround
  1. To "dump" the environment variables defined in the JobServer 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.
  4. Modify the script launching the JobServer: 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

 

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

 

JIRA ticket number  
Version history
Revision #:
7 of 7
Last update:
‎07-03-2018 12:35 PM
Updated by: