pentaho/pentaho-kettle · error · KettleException

JobMoveFiles.Error.Exception.UnableLoadRep

Error message

JobMoveFiles.Error.Exception.UnableLoadRep

What it means

JobEntryMoveFiles.loadRep() wraps any KettleException thrown while reading the entry's attributes (fields array with source_filefolder, destination_filefolder, wildcard) from the repository into a KettleException with localized 'JobMoveFiles.Error.Exception.UnableLoadRep' plus id_jobentry. The entry's repository rows could not be read.

Solutions

  1. Check the chained cause (dbe) for the underlying database error and fix connectivity/constraints
  2. Verify the repository schema matches your PDI version (run repair/upgrade)
  3. Delete and re-create the Move Files entry in Spoon to rebuild its repository rows
  4. Verify R_JOBENTRY_ATTRIBUTE rows for that id_jobentry are complete (nr_fields matches data rows)

Example fix

// before
jobEntry.loadRep(rep, metaStore, id, databases, slaveServers);
// after
try {
  jobEntry.loadRep(rep, metaStore, id, databases, slaveServers);
} catch (KettleException e) {
  logError("MoveFiles entry " + id + " unreadable: " + e.getCause(), e);
  // fall back to defaults or abort the job load
}
Defensive patterns

Strategy: try-catch

Validate before calling

// before loadRep, verify repository rows are readable
if (rep == null) throw new IllegalStateException("Repository not connected");
int nrFields = Const.toInt(rep.getJobEntryAttributeString(idJobentry, "nr_fields"), -1);
if (nrFields < 0) throw new IllegalStateException("Move Files entry rows missing for " + idJobentry);

Try / catch

try {
  entry.loadRep(rep, metaStore, idJobentry, databases, slaveServers);
} catch (KettleException e) {
  Throwable cause = e.getCause();
  if (cause != null) logError("Repository read failed: " + cause.getMessage(), cause);
  // re-create the entry in Spoon or repair the repository schema
  throw e;
}

Prevention

When it happens

Trigger: Calling loadRep for a Move Files entry when the R_JOBENTRY_ATTRIBUTE rows are missing/corrupt, the repository DB errors mid-read, or the number of field rows is inconsistent with the stored nr_fields value.

Common situations: Repository schema/version drift; partially written entry from a failed saveRep; DB connectivity loss during job load; manually deleted repository rows.

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/8f5947231d9000f4. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/job/entries/movefiles/JobEntryMoveFiles.java:312

      create_move_to_folder = rep.getJobEntryAttributeBoolean( id_jobentry, "create_move_to_folder" );
      add_moved_date = rep.getJobEntryAttributeBoolean( id_jobentry, "add_moved_date" );
      add_moved_time = rep.getJobEntryAttributeBoolean( id_jobentry, "add_moved_time" );
      SpecifyMoveFormat = rep.getJobEntryAttributeBoolean( id_jobentry, "SpecifyMoveFormat" );
      simulate = rep.getJobEntryAttributeBoolean( id_jobentry, "simulate" );

      // How many arguments?
      int argnr = rep.countNrJobEntryAttributes( id_jobentry, "source_filefolder" );
      allocate( argnr );

      // Read them all...
      for ( int a = 0; a < argnr; a++ ) {
        source_filefolder[a] = rep.getJobEntryAttributeString( id_jobentry, a, "source_filefolder" );
        destination_filefolder[a] = rep.getJobEntryAttributeString( id_jobentry, a, "destination_filefolder" );
        wildcard[a] = rep.getJobEntryAttributeString( id_jobentry, a, "wildcard" );
      }
    } catch ( KettleException dbe ) {

      throw new KettleException( BaseMessages.getString( PKG, "JobMoveFiles.Error.Exception.UnableLoadRep" )
        + id_jobentry, dbe );
    }
  }

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {
    try {
      rep.saveJobEntryAttribute( id_job, getObjectId(), "move_empty_folders", move_empty_folders );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "arg_from_previous", arg_from_previous );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "include_subfolders", include_subfolders );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "add_result_filesname", add_result_filesname );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "destination_is_a_file", destination_is_a_file );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "create_destination_folder", create_destination_folder );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "nr_errors_less_than", nr_errors_less_than );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "success_condition", success_condition );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "add_date", add_date );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "add_time", add_time );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "SpecifyFormat", SpecifyFormat );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "date_time_format", date_time_format );

View on GitHub (pinned to f3058517a1)