pentaho/pentaho-kettle · error · KettleException

Error retrieving sqlldr string

Error message

Error retrieving sqlldr string

What it means

createCommandLine resolves the sqlldr executable path through the VFS (getFileObject/getFilename). If resolving the configured 'sqlldr' path throws a KettleFileException, it is wrapped and rethrown as this KettleException while assembling the sqlldr command line.

Solutions

  1. Fix the sqlldr path in the step dialog to a valid, existing path (or plain executable name available on PATH).
  2. Resolve any environment variables used in the path and confirm they are defined at runtime.
  3. Test the path resolves: run sqlldr from the same user/host executing the transformation.
  4. If the executable name is enough, set the field to 'sqlldr' without a path instead of a VFS URL.

Example fix

// before (bad path with undefined variable)
sqlldr = ${SQLLDR_HOME}/bin/sqlldr
// after (defined variable or absolute path)
sqlldr = /opt/oracle/product/19c/client_1/bin/sqlldr
Defensive patterns

Strategy: validation

Validate before calling

// Java: verify the sqlldr path resolves and the executable exists before execution
String sqlldrPath = meta.getSqlldr();
if (sqlldrPath != null) {
  String resolved = transMeta.environmentSubstitute(sqlldrPath);
  File f = new File(resolved);
  if (!f.canExecute() && new File("/usr/bin/which sqlldr").canExecute() == false) {
    // fallback: rely on PATH; still warn if absolute path missing
  }
}

Try / catch

try {
  trans.execute(null);
} catch (KettleException e) {
  if (String.valueOf(e.getMessage()).contains("Error retrieving sqlldr")) {
    // inspect cause (KettleFileException) for the unresolvable path/variable
  }
}

Prevention

When it happens

Trigger: meta.getSqlldr() is non-null but getFileObject(meta.getSqlldr(), transMeta) fails — unresolvable/invalid VFS path or inaccessible resource — during createCommandLine called from execute.

Common situations: sqlldr path contains unresolvable environment variables (${...} undefined); typo in path scheme (e.g. missing file: prefix); the file/vfs resource does not exist at runtime; relative path resolved against wrong working directory.

Understand the failure class

Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/b3f12083781ef1e1. Report an issue: GitHub.

Appendix: source

Thrown at plugins/oracle-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/orabulkloader/OraBulkLoader.java:355

   * @param password
   *          Use the real password or not
   *
   * @return The string to execute.
   *
   * @throws KettleException
   *           Upon any exception
   */
  public String createCommandLine( OraBulkLoaderMeta meta, boolean password ) throws KettleException {
    StringBuilder sb = new StringBuilder( 300 );

    if ( meta.getSqlldr() != null ) {
      try {
        FileObject fileObject =
          getFileObject( meta.getSqlldr(), getTransMeta() );
        String sqlldr = getFilename( fileObject );
        sb.append( sqlldr );
      } catch ( KettleFileException ex ) {
        throw new KettleException( "Error retrieving sqlldr string", ex );
      }
    } else {
      throw new KettleException( "No sqlldr application specified" );
    }

    if ( meta.getControlFile() != null ) {
      try {
        FileObject fileObject =
          getFileObject( meta.getControlFile(), getTransMeta() );

        sb.append( " control=\'" );
        sb.append( getFilename( fileObject ) );
        sb.append( "\'" );
      } catch ( KettleFileException ex ) {
        throw new KettleException( "Error retrieving controlfile string", ex );
      }
    } else {
      throw new KettleException( "No control file specified" );

View on GitHub (pinned to f3058517a1)