{"record":{"id":"ceeeda8b454fd329","repo":"pentaho/pentaho-kettle","slug":"following-required-files-are-missing","errorCode":null,"errorMessage":"Following required files are missing: ","messagePattern":"Following required files are missing: ","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/file/BaseFileInputStepUtils.java","lineNumber":49,"sourceCode":" * @author Alexander Buloichik\n */\npublic class BaseFileInputStepUtils {\n\n  public static void handleMissingFiles( FileInputList files, LogChannelInterface log, boolean isErrorIgnored,\n      FileErrorHandler errorHandler ) throws KettleException {\n    List<FileObject> nonExistantFiles = files.getNonExistantFiles();\n\n    if ( !nonExistantFiles.isEmpty() ) {\n      String message = FileInputList.getRequiredFilesDescription( nonExistantFiles );\n      if ( log.isBasic() ) {\n        log.logBasic( \"Required files\", \"WARNING: Missing \" + message );\n      }\n      if ( isErrorIgnored ) {\n        for ( FileObject fileObject : nonExistantFiles ) {\n          errorHandler.handleNonExistantFile( fileObject );\n        }\n      } else {\n        throw new KettleException( \"Following required files are missing: \" + message );\n      }\n    }\n\n    List<FileObject> nonAccessibleFiles = files.getNonAccessibleFiles();\n    if ( !nonAccessibleFiles.isEmpty() ) {\n      String message = FileInputList.getRequiredFilesDescription( nonAccessibleFiles );\n      if ( log.isBasic() ) {\n        log.logBasic( \"Required files\", \"WARNING: Not accessible \" + message );\n      }\n      if ( isErrorIgnored ) {\n        for ( FileObject fileObject : nonAccessibleFiles ) {\n          errorHandler.handleNonAccessibleFile( fileObject );\n        }\n      } else {\n        throw new KettleException( \"Following required files are not accessible: \" + message );\n      }\n    }\n  }","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/file/BaseFileInputStepUtils.java#L31-L67","documentation":"BaseFileInputStepUtils.handleMissingFiles() collects the list of input files that do not exist and throws a KettleException listing them when errors are not ignored. File-input steps abort rather than continue when required files are absent and no error handling is configured.","triggerScenarios":"Running a text-file-input/CSV step whose resolved file list contains nonexistent files while the step's error-handling setting is not 'ignore missing files'.","commonSituations":"Wildcard patterns matching nothing; files removed or renamed after the transformation was designed; wrong directory; running on an agent where the files were not deployed; variable/parameter pointing to a wrong path.","solutions":["Create/restore the missing files listed in the exception message at the expected paths.","Fix the filename/wildcard or variable value in the step's File tab.","Enable 'Ignore missing files' / configure step error handling so nonexistent files are tolerated.","Verify variable substitution (${Internal...}) resolves correctly in the execution environment."],"exampleFix":"// before\nString file = \"/data/${TODAY}.csv\"; // variable unset -> path /data/${TODAY}.csv missing\n// after\nString file = \"/data/\" + getVariable(\"TODAY\", \"\") + \".csv\"; // resolves to existing file","handlingStrategy":"validation","validationCode":"for (String file : files) {\n  if (!new java.io.File(file).exists()) {\n    throw new IllegalStateException(\"Missing input file: \" + file);\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  trans.execute(null);\n} catch (KettleException e) {\n  if (e.getMessage().startsWith(\"Following required files are missing\")) {\n    // provision files or adjust the file pattern, then retry\n  } else { throw e; }\n}","preventionTips":["Pre-check all configured input files exist before executing the transformation.","Use explicit file lists or well-tested wildcards; log resolved filenames.","Configure step error handling to tolerate missing files when acceptable.","Verify environment variables resolve to valid paths on the execution node."],"tags":["file-io","etl","missing-files"],"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"}