{"record":{"id":"174e544e5445f5fd","repo":"pentaho/pentaho-kettle","slug":"unable-to-save-job-entry-of-type-snmptrap-to-the-repository","errorCode":null,"errorMessage":"Unable to save job entry of type 'SNMPTrap' to the repository for id_job=","messagePattern":"Unable to save job entry of type 'SNMPTrap' to the repository for id_job=","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/snmptrap/JobEntrySNMPTrap.java","lineNumber":223,"sourceCode":"    }\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\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( \"Unable to save job entry of type 'SNMPTrap' to the repository for id_job=\"\n        + id_job, dbe );\n    }\n  }\n\n  /**\n   * @return Returns the serverName.\n   */\n  public String getServerName() {\n    return serverName;\n  }\n\n  /**\n   * @param serverName\n   *          The serverName to set.\n   */\n  public void setServerName( String serverName ) {\n    this.serverName = serverName;\n  }","sourceCodeStart":205,"sourceCodeEnd":241,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/snmptrap/JobEntrySNMPTrap.java#L205-L241","documentation":"JobEntrySNMPTrap.saveRep wraps any KettleDatabaseException raised while saving the SNMPTrap entry's attributes to the repository, rethrowing as KettleException with 'Unable to save job entry of type SNMPTrap to the repository for id_job=' plus the id. The job entry's SNMP configuration could not be persisted.","triggerScenarios":"Calling saveRep when Repository.saveJobEntryAttribute throws KettleDatabaseException - lost DB connection, permission denied, constraint violation, or storage failure.","commonSituations":"Saving a job while the repository session expired; read-only DB account; full tablespace/disk; schema not upgraded to current Pentaho version.","solutions":["Examine the chained KettleDatabaseException for the root SQL error.","Reconnect to the repository and retry the save.","Confirm the DB user has write access to the job attribute tables.","Upgrade/repair the repository schema if version-mismatched."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"if (rep == null || !rep.isConnected()) { rep.connect(); } // ensure session before save","typeGuard":null,"tryCatchPattern":"try {\n  entry.saveRep(rep, metaStore, idJob);\n} catch (KettleException e) {\n  logger.error(\"SNMPTrap saveRep failed, cause=\" + e.getCause(), e);\n  // reconnect and retry once\n}","preventionTips":["Reconnect to the repository after long idle periods before saving.","Confirm DB write privileges and free storage.","Keep the repository schema current.","Retry once on transient connection errors."],"tags":["kettle","repository","snmp","database"],"backgroundTag":"database-write-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"}