{"record":{"id":"ee2ced22970b1123","repo":"pentaho/pentaho-kettle","slug":"following-required-files-are-missing-message","errorCode":null,"errorMessage":"Following required files are missing: {message}","messagePattern":"Following required files are missing: (.+?)","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/textfileinput/TextFileInput.java","lineNumber":1292,"sourceCode":"    }\n\n    return filterOK;\n  }\n\n  private void handleMissingFiles() throws KettleException {\n    List<FileObject> nonExistantFiles = data.getFiles().getNonExistantFiles();\n\n    if ( nonExistantFiles.size() != 0 ) {\n      String message = FileInputList.getRequiredFilesDescription( nonExistantFiles );\n      if ( log.isBasic() ) {\n        log.logBasic( \"Required files\", \"WARNING: Missing \" + message );\n      }\n      if ( meta.isErrorIgnored() ) {\n        for ( FileObject fileObject : nonExistantFiles ) {\n          data.dataErrorLineHandler.handleNonExistantFile( fileObject );\n        }\n      } else {\n        throw new KettleException( \"Following required files are missing: \" + message );\n      }\n    }\n\n    List<FileObject> nonAccessibleFiles = data.getFiles().getNonAccessibleFiles();\n    if ( nonAccessibleFiles.size() != 0 ) {\n      String message = FileInputList.getRequiredFilesDescription( nonAccessibleFiles );\n      if ( log.isBasic() ) {\n        log.logBasic( \"Required files\", \"WARNING: Not accessible \" + message );\n      }\n      if ( meta.isErrorIgnored() ) {\n        for ( FileObject fileObject : nonAccessibleFiles ) {\n          data.dataErrorLineHandler.handleNonAccessibleFile( fileObject );\n        }\n      } else {\n        throw new KettleException( \"Following required files are not accessible: \" + message );\n      }\n    }\n  }","sourceCodeStart":1274,"sourceCodeEnd":1310,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/textfileinput/TextFileInput.java#L1274-L1310","documentation":"The TextFileInput step constructor validates that all files matched by the input specification exist. If some required files are missing and 'Ignore missing files' (meta.isErrorIgnored) is not enabled, it aborts initialization with 'Following required files are missing: <list>'.","triggerScenarios":"A wildcard/glob or explicit filename list matched files that do not exist at transformation start, with error-ignored disabled in the step's settings.","commonSituations":"Typos in file paths, upstream job failed to produce expected files, relative paths resolved from a different working directory, files deleted between scheduling and run time.","solutions":["Check the listed file paths for typos and verify each exists at run time.","Enable 'Ignore missing files' in the step (or handleNonExistantFile error handling) if absence is acceptable.","Use variables/parameters for paths and verify they resolve correctly in the execution environment.","Add a pre-step 'Check if files exist' job entry or file-exists validation before the transformation."],"exampleFix":"// before: ${INPUT_DIR}/data_*.csv matches nothing because INPUT_DIR is unset/typo\n// after: define and validate the variable, or tolerate missing files\n//   Internal.Step set parameter INPUT_DIR=/data/incoming\n//   OR in step settings check: 'Ignore missing files' (meta.setErrorIgnored(true))","handlingStrategy":"validation","validationCode":"// Verify every matched file exists before launching the transformation\nFile dir = new File(inputDir);\nFile[] matched = dir.listFiles((d, n) -> n.matches(\"data_.*\\\\.csv\"));\nif (matched == null || matched.length < expectedMinFiles) {\n  throw new IllegalStateException(\"Missing input files in \" + inputDir);\n}\nfor (File f : matched) if (!f.isFile()) throw new IllegalStateException(\"Not a file: \" + f);","typeGuard":null,"tryCatchPattern":"try {\n  initStep(inputFiles);\n} catch (KettleException e) {\n  if (e.getMessage().startsWith(\"Following required files are missing\")) {\n    alertOps(e.getMessage()); // includes the exact missing file list\n  }\n  throw e;\n}","preventionTips":["Use a 'Check if files exist' job entry before the transformation","Parameterize paths and log resolved values at run time","Enable 'Ignore missing files' only when partial input is acceptable","Ensure upstream jobs complete before file-consuming transformations"],"tags":["file-not-found","initialization","text-file-input"],"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"}