pentaho/pentaho-kettle · error · KettleException

LoadFileInput.Log.RequiredFilesMissing

LoadFileInput.Log.RequiredFilesMissing

Error message

LoadFileInput.Log.RequiredFilesMissing

What it means

LoadFileInput.handleMissingFiles aborts step initialization when any of the configured files don't exist (nonExistantFiles not empty), throwing KettleException with a RequiredFilesMissing message listing the missing files. FailHard on missing required files means the step refuses to start rather than silently skipping.

Solutions

  1. Read the message — it lists exactly which files are missing.
  2. Fix the paths in the file list (use variables relative to the runtime environment).
  3. Ensure files are staged on the executing node (including every cluster/pentaho server node).
  4. Verify variable substitution at runtime (log the resolved paths).
  5. If files may legitimately be absent, adjust the step settings to tolerate missing files or pre-filter with an 'If file exists' check.

Example fix

// before (config)
// file list: /data/inbound/orders.ldif
// after: parameterize and validate
String dir = environmentSubstitute("${INBOUND_DIR}");
File f = new File(dir, "orders.ldif");
if (!f.exists()) {
  throw new KettleException("Required file missing: " + f.getAbsolutePath());
}
Defensive patterns

Strategy: validation

Validate before calling

for (String p : configuredPaths) {
  File f = new File(environmentSubstitute(p));
  if (!f.exists()) throw new KettleException("Required file missing at init: " + f.getAbsolutePath());
}

Try / catch

try {
  trans.execute(null);
} catch (KettleException e) {
  if (e.getMessage().contains("RequiredFiles")) {
    log.error("Stage missing files on the executing node, or fix the file list", e);
  }
}

Prevention

When it happens

Trigger: init() calls handleMissingFiles; data.files.getNonExistantFiles() is non-empty — configured static file paths or wildcard results point to files that don't exist at init time.

Common situations: Typo or wrong absolute path in the file list; variable (${Internal...} or env var) not resolved as expected; file deleted between design time and runtime; relative path resolved against a different working directory on an agent/server; files not present on a cluster node.

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/011e30f2211442d6. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/loadfileinput/LoadFileInput.java:292

        try {
          inputStream.close();
        } catch ( Exception e ) { /* Ignore */
        }
      }
    }

    return retval;
  }

  private void handleMissingFiles() throws KettleException {
    List<FileObject> nonExistantFiles = data.files.getNonExistantFiles();

    if ( !nonExistantFiles.isEmpty() ) {
      String message = FileInputList.getRequiredFilesDescription( nonExistantFiles );
      logError( BaseMessages.getString( PKG, "LoadFileInput.Log.RequiredFilesTitle" ), BaseMessages.getString(
        PKG, "LoadFileInput.Log.RequiredFiles", message ) );

      throw new KettleException( BaseMessages.getString( PKG, "LoadFileInput.Log.RequiredFilesMissing", message ) );
    }

    List<FileObject> nonAccessibleFiles = data.files.getNonAccessibleFiles();
    if ( !nonAccessibleFiles.isEmpty() ) {
      String message = FileInputList.getRequiredFilesDescription( nonAccessibleFiles );
      logError( BaseMessages.getString( PKG, "LoadFileInput.Log.RequiredFilesTitle" ), BaseMessages.getString(
        PKG, "LoadFileInput.Log.RequiredNotAccessibleFiles", message ) );
      throw new KettleException( BaseMessages.getString(
        PKG, "LoadFileInput.Log.RequiredNotAccessibleFilesMissing", message ) );
    }
  }

  /**
   * Build an empty row based on the meta-data...
   *
   * @return
   */

View on GitHub (pinned to f3058517a1)