{"record":{"id":"b3f12083781ef1e1","repo":"pentaho/pentaho-kettle","slug":"error-retrieving-sqlldr-string-orabulkloader","errorCode":null,"errorMessage":"Error retrieving sqlldr string","messagePattern":"Error retrieving sqlldr string","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/oracle-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/orabulkloader/OraBulkLoader.java","lineNumber":355,"sourceCode":"   * @param password\n   *          Use the real password or not\n   *\n   * @return The string to execute.\n   *\n   * @throws KettleException\n   *           Upon any exception\n   */\n  public String createCommandLine( OraBulkLoaderMeta meta, boolean password ) throws KettleException {\n    StringBuilder sb = new StringBuilder( 300 );\n\n    if ( meta.getSqlldr() != null ) {\n      try {\n        FileObject fileObject =\n          getFileObject( meta.getSqlldr(), getTransMeta() );\n        String sqlldr = getFilename( fileObject );\n        sb.append( sqlldr );\n      } catch ( KettleFileException ex ) {\n        throw new KettleException( \"Error retrieving sqlldr string\", ex );\n      }\n    } else {\n      throw new KettleException( \"No sqlldr application specified\" );\n    }\n\n    if ( meta.getControlFile() != null ) {\n      try {\n        FileObject fileObject =\n          getFileObject( meta.getControlFile(), getTransMeta() );\n\n        sb.append( \" control=\\'\" );\n        sb.append( getFilename( fileObject ) );\n        sb.append( \"\\'\" );\n      } catch ( KettleFileException ex ) {\n        throw new KettleException( \"Error retrieving controlfile string\", ex );\n      }\n    } else {\n      throw new KettleException( \"No control file specified\" );","sourceCodeStart":337,"sourceCodeEnd":373,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/oracle-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/orabulkloader/OraBulkLoader.java#L337-L373","documentation":"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.","triggerScenarios":"meta.getSqlldr() is non-null but getFileObject(meta.getSqlldr(), transMeta) fails — unresolvable/invalid VFS path or inaccessible resource — during createCommandLine called from execute.","commonSituations":"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.","solutions":["Fix the sqlldr path in the step dialog to a valid, existing path (or plain executable name available on PATH).","Resolve any environment variables used in the path and confirm they are defined at runtime.","Test the path resolves: run sqlldr from the same user/host executing the transformation.","If the executable name is enough, set the field to 'sqlldr' without a path instead of a VFS URL."],"exampleFix":"// before (bad path with undefined variable)\nsqlldr = ${SQLLDR_HOME}/bin/sqlldr\n// after (defined variable or absolute path)\nsqlldr = /opt/oracle/product/19c/client_1/bin/sqlldr","handlingStrategy":"validation","validationCode":"// Java: verify the sqlldr path resolves and the executable exists before execution\nString sqlldrPath = meta.getSqlldr();\nif (sqlldrPath != null) {\n  String resolved = transMeta.environmentSubstitute(sqlldrPath);\n  File f = new File(resolved);\n  if (!f.canExecute() && new File(\"/usr/bin/which sqlldr\").canExecute() == false) {\n    // fallback: rely on PATH; still warn if absolute path missing\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  trans.execute(null);\n} catch (KettleException e) {\n  if (String.valueOf(e.getMessage()).contains(\"Error retrieving sqlldr\")) {\n    // inspect cause (KettleFileException) for the unresolvable path/variable\n  }\n}","preventionTips":["Use absolute paths or plain executable names resolvable on PATH.","Keep environment variables used in paths defined in the runtime environment (kitchen/carte).","Smoke-test the path resolution on the execution host before scheduling."],"tags":["kettle","oracle","sqlldr","path-resolution"],"backgroundTag":"file-not-found","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}