{"record":{"id":"53df1cc773f8b60c","repo":"pentaho/pentaho-kettle","slug":"jobpgpencryptfiles-error-exception-unableloadrep","errorCode":null,"errorMessage":"JobPGPEncryptFiles.Error.Exception.UnableLoadRep","messagePattern":"JobPGPEncryptFiles\\.Error\\.Exception\\.UnableLoadRep","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/pgpencryptfiles/JobEntryPGPEncryptFiles.java","lineNumber":349,"sourceCode":"      SpecifyMoveFormat = rep.getJobEntryAttributeBoolean( id_jobentry, \"SpecifyMoveFormat\" );\n      asciiMode = rep.getJobEntryAttributeBoolean( id_jobentry, \"asciiMode\" );\n\n      // How many arguments?\n      int argnr = rep.countNrJobEntryAttributes( id_jobentry, \"source_filefolder\" );\n      allocate( argnr );\n\n      // Read them all...\n      for ( int a = 0; a < argnr; a++ ) {\n        action_type[a] =\n          getActionTypeByCode( Const.NVL( rep.getJobEntryAttributeString( id_jobentry, a, \"action_type\" ), \"\" ) );\n        source_filefolder[a] = rep.getJobEntryAttributeString( id_jobentry, a, \"source_filefolder\" );\n        userid[a] = rep.getJobEntryAttributeString( id_jobentry, a, \"userid\" );\n        destination_filefolder[a] = rep.getJobEntryAttributeString( id_jobentry, a, \"destination_filefolder\" );\n        wildcard[a] = rep.getJobEntryAttributeString( id_jobentry, a, \"wildcard\" );\n      }\n    } catch ( KettleException dbe ) {\n\n      throw new KettleException( BaseMessages.getString( PKG, \"JobPGPEncryptFiles.Error.Exception.UnableLoadRep\" )\n        + id_jobentry, dbe );\n    }\n  }\n\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {\n    try {\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"gpglocation\", gpglocation );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"arg_from_previous\", arg_from_previous );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"include_subfolders\", include_subfolders );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"add_result_filesname\", add_result_filesname );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"destination_is_a_file\", destination_is_a_file );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"create_destination_folder\", create_destination_folder );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"nr_errors_less_than\", nr_errors_less_than );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"success_condition\", success_condition );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"add_date\", add_date );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"add_time\", add_time );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"SpecifyFormat\", SpecifyFormat );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"date_time_format\", date_time_format );","sourceCodeStart":331,"sourceCodeEnd":367,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/pgpencryptfiles/JobEntryPGPEncryptFiles.java#L331-L367","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Inspect the cause chain (getCause) for the real KettleDatabaseException and fix the repository DB connectivity or schema issue","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","If rows are unrecoverable, delete and recreate the PGP Encrypt Files job entry in the job"],"exampleFix":"// before\njobEntry.loadRep(rep, metaStore, idJobentry, databases, slaveServers); // throws raw\n// after\ntry {\n  jobEntry.loadRep(rep, metaStore, idJobentry, databases, slaveServers);\n} catch (KettleException e) {\n  logError(\"Failed to load PGP encrypt entry \" + idJobentry + \": \" + e.getCause(), e);\n  // repair or recreate the entry, or abort the job load\n}","handlingStrategy":"try-catch","validationCode":"// before loadRep\nif (rep != null && id_jobentry != null) {\n  // verify repository is reachable\n  rep.connect();\n}","typeGuard":null,"tryCatchPattern":"try {\n  entry.loadRep(rep, metaStore, idJobentry, databases, slaveServers);\n} catch (KettleException e) {\n  Throwable cause = e.getCause();\n  logError(\"Repository load failed for entry \" + idJobentry + \": \" + cause, e);\n  // recover: re-save entry from Spoon or abort load\n}","preventionTips":["Keep the repository database reachable and backed up before editing jobs","After Pentaho upgrades, run repository upgrade scripts so attribute schemas match","Re-save job entries in Spoon if loads start failing, to rewrite missing attributes"],"tags":["persistence","repository","database","kettle"],"backgroundTag":"database-query-failed","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}