pentaho/pentaho-kettle · error · KettleException

Following required files are missing:

Error message

Following required files are missing: 

What it means

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.

Solutions

  1. Create the missing files or fix the paths in the step's file list.
  2. Set the 'Required' column to 'N' for files that may legitimately be absent.
  3. Use variables/parameters for environment-dependent paths.
  4. Ensure the upstream job step producing the files runs first.

Example fix

// before (meta)
fileRequired[i] = "Y"; // file may not exist
// after
fileRequired[i] = "N"; // tolerate missing files
Defensive patterns

Strategy: validation

Validate before calling

for (String path : configuredPaths) {
  if (required && !new File(path).exists()) {
    throw new IllegalStateException("Missing required file: " + path);
  }
}

Try / catch

try { trans.execute(); } catch (KettleException e) { if (e.getMessage().startsWith("Following required files are missing")) { /* provision files */ } throw e; }

Prevention

When it happens

Trigger: FileInputList.getNonExistantFiles() is non-empty: a file/folder configured in the step (or matched with 'required=Y') does not exist at transformation start.

Common situations: Paths hardcoded for another machine/environment; files not yet produced by an upstream job; typos in directory/file paths; working-directory differences.

Understand the failure class

Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/7b02428b98d97330. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/getfilenames/GetFileNames.java:282

      if ( log.isBasic() ) {
        logBasic( BaseMessages.getString( PKG, "GetFileNames.Log.NrLine", "" + getLinesInput() ) );
      }
    }

    return true;
  }

  private void handleMissingFiles() throws KettleException {
    if ( meta.isdoNotFailIfNoFile() && data.files.nrOfFiles() == 0 ) {
      logBasic( BaseMessages.getString( PKG, "GetFileNames.Log.NoFile" ) );
      return;
    }
    List<FileObject> nonExistantFiles = data.files.getNonExistantFiles();

    if ( nonExistantFiles.size() != 0 ) {
      String message = FileInputList.getRequiredFilesDescription( nonExistantFiles );
      logBasic( "ERROR: Missing " + message );
      throw new KettleException( "Following required files are missing: " + message );
    }

    List<FileObject> nonAccessibleFiles = data.files.getNonAccessibleFiles();
    if ( nonAccessibleFiles.size() != 0 ) {
      String message = FileInputList.getRequiredFilesDescription( nonAccessibleFiles );
      logBasic( "WARNING: Not accessible " + message );
      throw new KettleException( "Following required files are not accessible: " + message );
    }
  }

  public boolean init( StepMetaInterface smi, StepDataInterface sdi ) {
    meta = (GetFileNamesMeta) smi;
    data = (GetFileNamesData) sdi;


    if ( super.init( smi, sdi ) ) {
      //Set Embedded NamedCluter MetatStore Provider Key so that it can be passed to VFS
      if ( getTransMeta().getNamedClusterEmbedManager() != null ) {

View on GitHub (pinned to f3058517a1)