{"record":{"id":"8537bcd994a76579","repo":"pentaho/pentaho-kettle","slug":"unable-to-save-job-entry-of-type-ping-to-the-repository-for","errorCode":null,"errorMessage":"Unable to save job entry of type 'ping' to the repository for id_job=","messagePattern":"Unable to save job entry of type 'ping' to the repository for id_job=","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/ping/JobEntryPing.java","lineNumber":189,"sourceCode":"        }\n      }\n    } catch ( KettleException dbe ) {\n      throw new KettleException(\n        \"Unable to load job entry of type 'ping' exists 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(), \"hostname\", hostname );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"nbr_packets\", nbrPackets );\n\n      // TODO: The following line may be removed 3 versions after 2.5.0\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"nbrpaquets\", nbrPackets );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"timeout\", timeout );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"pingtype\", pingtype );\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException(\n        \"Unable to save job entry of type 'ping' to the repository for id_job=\" + id_job, dbe );\n    }\n  }\n\n  public static boolean isPositiveInteger( String strNum ) {\n    boolean result = true;\n    if ( strNum == null ) {\n      result = false;\n    } else {\n      try {\n        int value = Integer.parseInt( strNum.trim() );\n        if ( value <= 0 ) {\n          result = false;\n        }\n      } catch ( NumberFormatException nfe ) {\n        result = false;\n      }\n    }","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/ping/JobEntryPing.java#L171-L207","documentation":"JobEntryPing.saveRep wraps any KettleDatabaseException from saving the ping entry's attributes (including legacy 'nbrpaquets') into a KettleException with message 'Unable to save job entry of type ping to the repository for id_job=' + id. The DB error is the cause. It means the ping entry could not be written to the repository.","triggerScenarios":"Calling saveRep (directly or via saving the job) when any rep.saveJobEntryAttribute call throws KettleDatabaseException: connection failure, constraint violation, read-only DB, or invalid/unsaved ObjectId.","commonSituations":"Repository session dropped during save; DB out of disk/quota; saving an entry that was never inserted (null ObjectId); schema mismatch on legacy attribute keys after upgrade.","solutions":["Check the cause for the SQL error and resolve the repository DB issue (connectivity, permissions, space)","Ensure the entry is inserted with a valid ObjectId before saving attributes; save the job through the normal rep.save flow","Reconnect and retry; clean up partially written attribute rows if needed"],"exampleFix":"// before\nentry.saveRep(rep, metaStore, idJob); // may throw\n// after\ntry {\n  entry.saveRep(rep, metaStore, idJob);\n} catch (KettleException e) {\n  logError(\"Cannot save ping entry to repository: \" + e.getCause(), e);\n  // warn user changes are not persisted\n}","handlingStrategy":"try-catch","validationCode":"if (entry.getObjectId() == null) throw new KettleException(\"Save the job entry before saving attributes\");\nrep.connect(); // fail fast if repository unreachable","typeGuard":null,"tryCatchPattern":"try {\n  entry.saveRep(rep, metaStore, idJob);\n} catch (KettleException e) {\n  logError(\"Cannot save ping entry: \" + e.getCause(), e);\n  // retry after DB fix; verify no partial attribute rows\n}","preventionTips":["Persist jobs via the normal repository save flow with valid ObjectIds","Maintain repository DB health (space, permissions, connections)","Apply schema upgrades so legacy attributes like nbrpaquets remain writable"],"tags":["persistence","repository","database-write","kettle"],"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"}