{"record":{"id":"4f0e26f344a111a0","repo":"pentaho/pentaho-kettle","slug":"error-0002-jobentrypgpverify-cannot-load-job-from-repository","errorCode":"ERROR_0002","errorMessage":"JobEntryPGPVerify.ERROR_0002_Cannot_Load_Job_From_Repository","messagePattern":"JobEntryPGPVerify\\.ERROR_0002_Cannot_Load_Job_From_Repository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/pgpverify/JobEntryPGPVerify.java","lineNumber":118,"sourceCode":"      filename = XMLHandler.getTagValue( entrynode, \"filename\" );\n      detachedfilename = XMLHandler.getTagValue( entrynode, \"detachedfilename\" );\n      useDetachedSignature = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( entrynode, \"useDetachedSignature\" ) );\n\n    } catch ( KettleXMLException xe ) {\n      throw new KettleXMLException( BaseMessages.getString(\n        PKG, \"JobEntryPGPVerify.ERROR_0001_Cannot_Load_Job_Entry_From_Xml_Node\" ), xe );\n    }\n  }\n\n  public void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,\n    List<SlaveServer> slaveServers ) throws KettleException {\n    try {\n      gpglocation = rep.getJobEntryAttributeString( id_jobentry, \"gpglocation\" );\n      filename = rep.getJobEntryAttributeString( id_jobentry, \"filename\" );\n      detachedfilename = rep.getJobEntryAttributeString( id_jobentry, \"detachedfilename\" );\n      useDetachedSignature = rep.getJobEntryAttributeBoolean( id_jobentry, \"useDetachedSignature\" );\n    } catch ( KettleException dbe ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"JobEntryPGPVerify.ERROR_0002_Cannot_Load_Job_From_Repository\", 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(), \"filename\", filename );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"detachedfilename\", detachedfilename );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"useDetachedSignature\", useDetachedSignature );\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"JobEntryPGPVerify.ERROR_0003_Cannot_Save_Job_Entry\", id_job ), dbe );\n    }\n  }\n\n  public void setGPGLocation( String gpglocation ) {\n    this.gpglocation = gpglocation;","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/pgpverify/JobEntryPGPVerify.java#L100-L136","documentation":"JobEntryPGPVerify.loadRep wraps any KettleException raised while reading the entry's attributes (gpglocation, filename, detachedfilename, useDetachedSignature) from the repository into a KettleException with ERROR_0002 'Cannot load job from repository' plus the id_jobentry. The original database exception is the cause. It means repository-based deserialization of this job entry failed.","triggerScenarios":"Calling loadRep (directly or through repository job load) when rep.getJobEntryAttributeString/Boolean throws KettleException: DB connection failure, missing/corrupt r_jobentry_attribute rows, or schema mismatch.","commonSituations":"Repository schema drifted after an upgrade so 'useDetachedSignature' or other columns/keys are absent; DB outage while opening a job; orphaned job entry with no attribute rows.","solutions":["Read the cause (KettleDatabaseException) to identify the underlying DB error and fix connectivity or corruption","Verify attribute rows exist for the id_jobentry; re-save the entry from Spoon to rewrite them","Check repository schema version vs Pentaho version and apply upgrade scripts"],"exampleFix":"// before\nentry.loadRep(rep, metaStore, idJobentry, databases, slaveServers);\n// after\ntry {\n  entry.loadRep(rep, metaStore, idJobentry, databases, slaveServers);\n} catch (KettleException e) {\n  logError(\"Cannot load PGP verify entry \" + idJobentry + \" from repo: \" + e.getCause(), e);\n}","handlingStrategy":"try-catch","validationCode":"// before loadRep\nif (id_jobentry == null || rep == null) throw new KettleException(\"No repository id for job entry\");","typeGuard":null,"tryCatchPattern":"try {\n  entry.loadRep(rep, metaStore, idJobentry, databases, slaveServers);\n} catch (KettleException e) {\n  logError(\"Cannot load PGP verify entry \" + idJobentry + \": \" + e.getCause(), e);\n  // repair rows or recreate the entry\n}","preventionTips":["Run repository schema upgrades after Pentaho upgrades","Back up the repository DB before bulk job edits","Re-save entries whose loads fail to regenerate missing attribute rows"],"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"}