{"record":{"id":"969871b1f1e551a1","repo":"pentaho/pentaho-kettle","slug":"error-retrieving-logfile-string-orabulkloader","errorCode":null,"errorMessage":"Error retrieving logfile string","messagePattern":"Error retrieving logfile 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":389,"sourceCode":"      }\n    } else {\n      throw new KettleException( \"No control file specified\" );\n    }\n\n    if ( OraBulkLoaderMeta.METHOD_AUTO_CONCURRENT.equals( meta.getLoadMethod() ) ) {\n      sb.append( \" data=\\'-\\'\" );\n    }\n\n    if ( meta.getLogFile() != null ) {\n      try {\n        FileObject fileObject =\n          getFileObject( meta.getLogFile(), getTransMeta() );\n\n        sb.append( \" log=\\'\" );\n        sb.append( getFilename( fileObject ) );\n        sb.append( \"\\'\" );\n      } catch ( KettleFileException ex ) {\n        throw new KettleException( \"Error retrieving logfile string\", ex );\n      }\n    }\n\n    if ( meta.getBadFile() != null ) {\n      try {\n        FileObject fileObject =\n          getFileObject( meta.getBadFile(), getTransMeta() );\n\n        sb.append( \" bad=\\'\" );\n        sb.append( getFilename( fileObject ) );\n        sb.append( \"\\'\" );\n      } catch ( KettleFileException ex ) {\n        throw new KettleException( \"Error retrieving badfile string\", ex );\n      }\n    }\n\n    if ( meta.getDiscardFile() != null ) {\n      try {","sourceCodeStart":371,"sourceCodeEnd":407,"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#L371-L407","documentation":"When a log file is configured, createCommandLine resolves its path via VFS and appends log='<path>'. If getFileObject/getFilename throws KettleFileException, it is wrapped and rethrown as this KettleException while building the sqlldr command.","triggerScenarios":"meta.getLogFile() is non-null but VFS resolution fails (unresolvable variable, invalid path/scheme, inaccessible target) during createCommandLine from execute.","commonSituations":"Log path uses an undefined environment variable; log directory does not exist; typo in path scheme; permissions prevent resolving/creating the file.","solutions":["Fix the log file path in the step dialog; create the parent directory first.","Define any environment variables used in the path.","Choose a location writable by the user running the transformation.","Clear the log file field if a log is not needed (the error only occurs when a value is set)."],"exampleFix":"// before (missing directory)\nlog = /logs/oracle/load.log\n// after (directory exists)\nlog = /tmp/orabulk/load.log","handlingStrategy":"validation","validationCode":"// Java: pre-check optional log file path\nString log = meta.getLogFile();\nif (log != null) {\n  String resolved = transMeta.environmentSubstitute(log);\n  File dir = new File(resolved).getAbsoluteFile().getParentFile();\n  if (!dir.isDirectory()) {\n    throw new IllegalStateException(\"Log directory does not exist: \" + dir);\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  trans.execute(null);\n} catch (KettleException e) {\n  if (String.valueOf(e.getMessage()).contains(\"Error retrieving logfile\")) {\n    // inspect cause; fix path or clear the field if logging not needed\n  }\n}","preventionTips":["Create log directories as part of deployment.","Keep optional file fields empty rather than filled with placeholder paths.","Use absolute paths on the execution host."],"tags":["kettle","oracle","logfile","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"}