pentaho/pentaho-kettle · error · KettleException

JobPGPEncryptFiles.Error.Exception.UnableLoadRep

Error message

JobPGPEncryptFiles.Error.Exception.UnableLoadRep

What it means

JobEntryPGPEncryptFiles.loadRep wraps any KettleException thrown while reading this PGP-encrypt-files job entry's attributes (gpg location, userids, destination folders, wildcards) from the Pentaho repository into a KettleException whose message is the localized 'UnableLoadRep' text plus the job entry id. It is a persistence-layer wrapper: the original database exception is attached as the cause. The library throws it so callers get a consistent, entry-identifying message when repository deserialization of this entry fails.

Solutions

  1. Inspect the cause chain (getCause) for the real KettleDatabaseException and fix the repository DB connectivity or schema issue
  2. Verify the job entry rows exist in r_jobentry_attribute for the given id_jobentry; re-save the job entry from Spoon to rewrite missing attributes
  3. If rows are unrecoverable, delete and recreate the PGP Encrypt Files job entry in the job

Example fix

// before
jobEntry.loadRep(rep, metaStore, idJobentry, databases, slaveServers); // throws raw
// after
try {
  jobEntry.loadRep(rep, metaStore, idJobentry, databases, slaveServers);
} catch (KettleException e) {
  logError("Failed to load PGP encrypt entry " + idJobentry + ": " + e.getCause(), e);
  // repair or recreate the entry, or abort the job load
}
Defensive patterns

Strategy: try-catch

Validate before calling

// before loadRep
if (rep != null && id_jobentry != null) {
  // verify repository is reachable
  rep.connect();
}

Try / catch

try {
  entry.loadRep(rep, metaStore, idJobentry, databases, slaveServers);
} catch (KettleException e) {
  Throwable cause = e.getCause();
  logError("Repository load failed for entry " + idJobentry + ": " + cause, e);
  // recover: re-save entry from Spoon or abort load
}

Prevention

When it happens

Trigger: Calling loadRep (directly or via loading a job from a repository) when the underlying repository read fails: the r_jobentry_attribute rows are missing/corrupt, the repository database connection drops mid-read, or a loop-index/attribute read throws KettleDatabaseException.

Common situations: Repository database was restored from an older schema so per-array attributes (userid/destination_filefolder/wildcard) are missing or have inconsistent nr indices; DB network outage while opening a job; corrupted repository rows after a failed save.

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/53df1cc773f8b60c. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/job/entries/pgpencryptfiles/JobEntryPGPEncryptFiles.java:349

      SpecifyMoveFormat = rep.getJobEntryAttributeBoolean( id_jobentry, "SpecifyMoveFormat" );
      asciiMode = rep.getJobEntryAttributeBoolean( id_jobentry, "asciiMode" );

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

      // Read them all...
      for ( int a = 0; a < argnr; a++ ) {
        action_type[a] =
          getActionTypeByCode( Const.NVL( rep.getJobEntryAttributeString( id_jobentry, a, "action_type" ), "" ) );
        source_filefolder[a] = rep.getJobEntryAttributeString( id_jobentry, a, "source_filefolder" );
        userid[a] = rep.getJobEntryAttributeString( id_jobentry, a, "userid" );
        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, "JobPGPEncryptFiles.Error.Exception.UnableLoadRep" )
        + id_jobentry, dbe );
    }
  }

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {
    try {
      rep.saveJobEntryAttribute( id_job, getObjectId(), "gpglocation", gpglocation );
      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)