{"record":{"id":"d105682516ff7ef9","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-job-entry-of-type-snmptrap-from-the","errorCode":null,"errorMessage":"Unable to load job entry of type 'SNMPTrap' from the repository for id_jobentry=","messagePattern":"Unable to load job entry of type 'SNMPTrap' from the repository for id_jobentry=","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/snmptrap/JobEntrySNMPTrap.java","lineNumber":203,"sourceCode":"  }\n\n  public void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,\n    List<SlaveServer> slaveServers ) throws KettleException {\n    try {\n      port = rep.getJobEntryAttributeString( id_jobentry, \"port\" );\n      serverName = rep.getJobEntryAttributeString( id_jobentry, \"servername\" );\n      oid = rep.getJobEntryAttributeString( id_jobentry, \"oid\" );\n      message = rep.getJobEntryAttributeString( id_jobentry, \"message\" );\n      comString = rep.getJobEntryAttributeString( id_jobentry, \"comstring\" );\n      timeout = rep.getJobEntryAttributeString( id_jobentry, \"timeout\" );\n      nrretry = rep.getJobEntryAttributeString( id_jobentry, \"nrretry\" );\n      targettype = rep.getJobEntryAttributeString( id_jobentry, \"targettype\" );\n      user = rep.getJobEntryAttributeString( id_jobentry, \"user\" );\n      passphrase = Encr.decryptPasswordOptionallyEncrypted( rep.getJobEntryAttributeString( id_jobentry, \"passphrase\" ) );\n      engineid = rep.getJobEntryAttributeString( id_jobentry, \"engineid\" );\n\n    } catch ( KettleException dbe ) {\n      throw new KettleException(\n        \"Unable to load job entry of type 'SNMPTrap' from the repository for id_jobentry=\" + 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(), \"port\", port );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"servername\", serverName );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"oid\", oid );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"message\", message );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"comstring\", comString );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"timeout\", timeout );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"nrretry\", nrretry );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"targettype\", targettype );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"user\", user );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"passphrase\", Encr.encryptPasswordIfNotUsingVariables( passphrase ) );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"engineid\", engineid );\n","sourceCodeStart":185,"sourceCodeEnd":221,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/snmptrap/JobEntrySNMPTrap.java#L185-L221","documentation":"JobEntrySNMPTrap.loadRep wraps any KettleException raised while reading the SNMPTrap entry's attributes ('servername', 'port', 'community', 'targettype', 'user', 'passphrase', 'engineid') from the repository, rethrowing as KettleException with the message and id_jobentry. It indicates the repository metadata for this entry cannot be loaded.","triggerScenarios":"Calling loadRep for a JobEntrySNMPTrap when Repository.getJobEntryAttributeString throws - repository DB unavailable, missing rows for the given id_jobentry, or corrupted attributes.","commonSituations":"Repository connection dropped while opening a job; rows deleted directly from the DB; schema drift after Pentaho upgrade; wrong id_jobentry passed in.","solutions":["Test and restore the repository database connection.","Verify rows exist in R_JOBENTRY_ATTRIBUTE for the given id_jobentry.","Re-create/re-save the SNMPTrap job entry to repopulate repository attributes.","Inspect the chained cause for the underlying SQL failure and address it."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if (idJobEntry == null || rep == null) throw new KettleException(\"Repository or id_jobentry missing before loadRep\");","typeGuard":null,"tryCatchPattern":"try {\n  entry.loadRep(rep, metaStore, idJobEntry, databases, slaveServers);\n} catch (KettleException e) {\n  logger.error(\"SNMPTrap loadRep failed id=\" + idJobEntry + \", cause=\" + e.getCause(), e);\n}","preventionTips":["Verify repository connectivity before opening jobs.","Do not delete repository rows directly in the DB.","Upgrade repository schema alongside Pentaho upgrades.","Log the chained cause to pinpoint SQL-level failures."],"tags":["kettle","repository","snmp","persistence"],"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"}