{"record":{"id":"7b02428b98d97330","repo":"pentaho/pentaho-kettle","slug":"following-required-files-are-missing-getfilenames","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/getfilenames/GetFileNames.java","lineNumber":282,"sourceCode":"      if ( log.isBasic() ) {\n        logBasic( BaseMessages.getString( PKG, \"GetFileNames.Log.NrLine\", \"\" + getLinesInput() ) );\n      }\n    }\n\n    return true;\n  }\n\n  private void handleMissingFiles() throws KettleException {\n    if ( meta.isdoNotFailIfNoFile() && data.files.nrOfFiles() == 0 ) {\n      logBasic( BaseMessages.getString( PKG, \"GetFileNames.Log.NoFile\" ) );\n      return;\n    }\n    List<FileObject> nonExistantFiles = data.files.getNonExistantFiles();\n\n    if ( nonExistantFiles.size() != 0 ) {\n      String message = FileInputList.getRequiredFilesDescription( nonExistantFiles );\n      logBasic( \"ERROR: Missing \" + message );\n      throw new KettleException( \"Following required files are missing: \" + message );\n    }\n\n    List<FileObject> nonAccessibleFiles = data.files.getNonAccessibleFiles();\n    if ( nonAccessibleFiles.size() != 0 ) {\n      String message = FileInputList.getRequiredFilesDescription( nonAccessibleFiles );\n      logBasic( \"WARNING: Not accessible \" + message );\n      throw new KettleException( \"Following required files are not accessible: \" + message );\n    }\n  }\n\n  public boolean init( StepMetaInterface smi, StepDataInterface sdi ) {\n    meta = (GetFileNamesMeta) smi;\n    data = (GetFileNamesData) sdi;\n\n\n    if ( super.init( smi, sdi ) ) {\n      //Set Embedded NamedCluter MetatStore Provider Key so that it can be passed to VFS\n      if ( getTransMeta().getNamedClusterEmbedManager() != null ) {","sourceCodeStart":264,"sourceCodeEnd":300,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/getfilenames/GetFileNames.java#L264-L300","documentation":"During init (handleMissingFiles), if any of the configured required files do not exist, the step logs and throws a KettleException listing them. The step refuses to start when required inputs are absent.","triggerScenarios":"FileInputList.getNonExistantFiles() is non-empty: a file/folder configured in the step (or matched with 'required=Y') does not exist at transformation start.","commonSituations":"Paths hardcoded for another machine/environment; files not yet produced by an upstream job; typos in directory/file paths; working-directory differences.","solutions":["Create the missing files or fix the paths in the step's file list.","Set the 'Required' column to 'N' for files that may legitimately be absent.","Use variables/parameters for environment-dependent paths.","Ensure the upstream job step producing the files runs first."],"exampleFix":"// before (meta)\nfileRequired[i] = \"Y\"; // file may not exist\n// after\nfileRequired[i] = \"N\"; // tolerate missing files","handlingStrategy":"validation","validationCode":"for (String path : configuredPaths) {\n  if (required && !new File(path).exists()) {\n    throw new IllegalStateException(\"Missing required file: \" + path);\n  }\n}","typeGuard":null,"tryCatchPattern":"try { trans.execute(); } catch (KettleException e) { if (e.getMessage().startsWith(\"Following required files are missing\")) { /* provision files */ } throw e; }","preventionTips":["Parameterize paths per environment","Set 'Required' correctly per file (Y only if truly mandatory)","Run file-producing steps before this transformation"],"tags":["pentaho","kettle","missing-files","init"],"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"}