pentaho/pentaho-kettle · error · KettleException

JobEntryCheckFilesLocked.UnableToLoadFromRepo

Error message

JobEntryCheckFilesLocked.UnableToLoadFromRepo

What it means

JobEntryCheckFilesLocked.loadRep wraps any KettleException from the repository when reading the entry's stored attributes (count plus per-row name/filemask values) into this KettleException, identifying the failing entry by its ObjectId.

Solutions

  1. Check the chained KettleException/dbe for the underlying database error
  2. Verify rows exist in r_jobentry_attribute for the reported id_jobentry
  3. Reopen and re-save the entry in Spoon to rewrite its attributes
  4. Fix repository connectivity/permissions, then reload the job

Example fix

// before
entry.loadRep(rep, metaStore, staleId, databases, slaveServers); // id from an old export
// after
ObjectId id = rep.getJobEntryId(jobMeta, entryName); // resolve a live id first
entry.loadRep(rep, metaStore, id, databases, slaveServers);
Defensive patterns

Strategy: try-catch

Validate before calling

// pre-check repository state before loadRep
if (idJobEntry == null) throw new IllegalStateException("No repository id for entry");
// optionally: rep countJobEntryAttributes or direct SQL against r_jobentry_attribute

Try / catch

try {
  entry.loadRep(rep, metaStore, idJobEntry, databases, slaveServers);
} catch (KettleException e) {
  log.error("Repo load failed for entry id " + idJobEntry + ": " + e.getCause(), e);
}

Prevention

When it happens

Trigger: Calling loadRep against a repository where r_jobentry_attribute rows for this entry are missing/corrupt, the repository connection fails mid-read, or getJobEntryAttributeString throws for the given id_jobentry.

Common situations: Repository database restored from backup missing attribute rows; entry rows orphaned after a bad job delete; DB connection/permission problems; repository schema version mismatch.

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/029605ff721fdced. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/job/entries/checkfilelocked/JobEntryCheckFilesLocked.java:171

  public void loadRep( Repository rep, IMetaStore metaStore, ObjectId idJobEntry, List<DatabaseMeta> databases,
    List<SlaveServer> slaveServers ) throws KettleException {
    try {
      argFromPrevious = rep.getJobEntryAttributeBoolean( idJobEntry, ARG_FROM_PREVIOUS_ATTR );
      includeSubfolders = rep.getJobEntryAttributeBoolean( idJobEntry, INCLUDE_SUBFOLDERS_ATTR );

      // How many arguments?
      int argnr = rep.countNrJobEntryAttributes( idJobEntry, NAME_ATTR );
      arguments = new String[argnr];
      filemasks = new String[argnr];

      // Read them all...
      for ( int a = 0; a < argnr; a++ ) {
        arguments[a] = rep.getJobEntryAttributeString( idJobEntry, a, NAME_ATTR );
        filemasks[a] = rep.getJobEntryAttributeString( idJobEntry, a, FILE_MASK_ATTR );
      }
    } catch ( KettleException dbe ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "JobEntryCheckFilesLocked.UnableToLoadFromRepo", String.valueOf( idJobEntry ) ), dbe );
    }
  }

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId idJob ) throws KettleException {
    try {

      rep.saveJobEntryAttribute( idJob, getObjectId(), ARG_FROM_PREVIOUS_ATTR, argFromPrevious );
      rep.saveJobEntryAttribute( idJob, getObjectId(), INCLUDE_SUBFOLDERS_ATTR, includeSubfolders );

      // save the arguments...
      if ( arguments != null ) {
        for ( int i = 0; i < arguments.length; i++ ) {
          rep.saveJobEntryAttribute( idJob, getObjectId(), i, NAME_ATTR, arguments[i] );
          rep.saveJobEntryAttribute( idJob, getObjectId(), i, FILE_MASK_ATTR, filemasks[i] );
        }
      }
    } catch ( KettleDatabaseException dbe ) {

View on GitHub (pinned to f3058517a1)