pentaho/pentaho-kettle · error · KettleException

Unable to load job entry of type 'wait for file' from the…

Error message

Unable to load job entry of type 'wait for file' from the repository for id_jobentry=

What it means

JobEntryWaitForFile.loadRep() wraps a KettleException from repository attribute reads into a KettleException with message "Unable to load job entry of type 'wait for file' from the repository for id_jobentry=" plus the id. The stored wait-for-file settings could not be read from the repository.

Solutions

  1. Verify repository connectivity and credentials, then reopen the job.
  2. Check/rebuild R_JOBENTRY_ATTRIBUTE rows for the reported id_jobentry by re-saving from Spoon.
  3. Run repository schema upgrade scripts.
  4. Load the job from a .kjb file as a workaround.

Example fix

// before
JobMeta job = new JobMeta(log, rep, id_job, metaStore); // throws
// after: detect unreadable repository first
if ( !rep.isConnected() ) { rep.connect(user, pass); }
JobMeta job = new JobMeta(log, rep, id_job, metaStore);
Defensive patterns

Strategy: try-catch

Validate before calling

// Confirm repository session before loadRep
if ( !rep.isConnected() ) throw new KettleException("Repository not connected");
if ( id_jobentry == null ) throw new KettleException("No repository id for wait-for-file entry");

Type guard

boolean loadable(Repository rep, ObjectId id) {
  return rep != null && rep.isConnected() && id != null;
}

Try / catch

try {
  jobEntry.loadRep(rep, metaStore, id_jobentry, databases, slaveServers);
} catch ( KettleException e ) {
  logError("Wait-for-file repo load failed (id=" + id_jobentry + "): " + e.getCause(), e);
  throw e; // or fall back to XML
}

Prevention

When it happens

Trigger: Calling loadRep(rep, metaStore, id_jobentry, ...) when the repository throws while reading 'maximum_timeout', 'check_cycle_time', 'success_on_timeout', 'file_size_check' or 'add_filename_result' attributes — DB failure or missing rows.

Common situations: Repository database unreachable; attribute rows for the id_jobentry deleted or never saved; schema drift after Pentaho upgrades.

Understand the failure class

Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/job/entries/waitforfile/JobEntryWaitForFile.java:129

      successOnTimeout = "Y".equalsIgnoreCase( XMLHandler.getTagValue( entrynode, "success_on_timeout" ) );
      fileSizeCheck = "Y".equalsIgnoreCase( XMLHandler.getTagValue( entrynode, "file_size_check" ) );
      addFilenameToResult = "Y".equalsIgnoreCase( XMLHandler.getTagValue( entrynode, "add_filename_result" ) );
    } catch ( KettleXMLException xe ) {
      throw new KettleXMLException( "Unable to load job entry of type 'wait for file' from XML node", xe );
    }
  }

  public void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,
    List<SlaveServer> slaveServers ) throws KettleException {
    try {
      filename = rep.getJobEntryAttributeString( id_jobentry, "filename" );
      maximumTimeout = rep.getJobEntryAttributeString( id_jobentry, "maximum_timeout" );
      checkCycleTime = rep.getJobEntryAttributeString( id_jobentry, "check_cycle_time" );
      successOnTimeout = rep.getJobEntryAttributeBoolean( id_jobentry, "success_on_timeout" );
      fileSizeCheck = rep.getJobEntryAttributeBoolean( id_jobentry, "file_size_check" );
      addFilenameToResult = rep.getJobEntryAttributeBoolean( id_jobentry, "add_filename_result" );
    } catch ( KettleException dbe ) {
      throw new KettleException(
        "Unable to load job entry of type 'wait for file' from the repository for id_jobentry=" + id_jobentry,
        dbe );
    }
  }

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {
    try {
      rep.saveJobEntryAttribute( id_job, getObjectId(), "filename", filename );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "maximum_timeout", maximumTimeout );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "check_cycle_time", checkCycleTime );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "success_on_timeout", successOnTimeout );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "file_size_check", fileSizeCheck );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "add_filename_result", addFilenameToResult );
    } catch ( KettleDatabaseException dbe ) {
      throw new KettleException( "Unable to save job entry of type 'wait for file' to the repository for id_job="
        + id_job, dbe );
    }
  }

View on GitHub (pinned to f3058517a1)