{"record":{"id":"9c1d881bd78d44ab","repo":"pentaho/pentaho-kettle","slug":"jobentrydelay-unabletosavetorepo-label","errorCode":null,"errorMessage":"JobEntryDelay.UnableToSaveToRepo.Label","messagePattern":"JobEntryDelay\\.UnableToSaveToRepo\\.Label","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/delay/JobEntryDelay.java","lineNumber":114,"sourceCode":"    try {\n      maximumTimeout = rep.getJobEntryAttributeString( id_jobentry, \"maximumTimeout\" );\n      scaleTime = (int) rep.getJobEntryAttributeInteger( id_jobentry, \"scaletime\" );\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"JobEntryDelay.UnableToLoadFromRepo.Label\" )\n        + id_jobentry, dbe );\n    }\n  }\n\n  //\n  // Save the attributes of this job entry\n  //\n  @Override\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {\n    try {\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"maximumTimeout\", maximumTimeout );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"scaletime\", scaleTime );\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException(\n        BaseMessages.getString( PKG, \"JobEntryDelay.UnableToSaveToRepo.Label\" ) + id_job, dbe );\n    }\n  }\n\n  /**\n   * Execute this job entry and return the result. In this case it means, just set the result boolean in the Result\n   * class.\n   *\n   * @param previousResult\n   *          The result of the previous execution\n   * @return The Result of the execution.\n   */\n  @Override\n  public Result execute( Result previousResult, int nr ) {\n    Result result = previousResult;\n    result.setResult( false );\n    int multiple;\n    String waitScale;","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/delay/JobEntryDelay.java#L96-L132","documentation":"JobEntryDelay.saveRep throws this localized KettleException when the repository throws KettleDatabaseException while saving maximumTimeout and scaletime attributes for id_job. The cause is chained for diagnosis. It means the Delay entry's configuration was not persisted.","triggerScenarios":"saveRep called when saveJobEntryAttribute fails — repository write failure, constraint/privilege violation, null or invalid ObjectId on the job entry, or repository connection lost during save.","commonSituations":"Read-only repository credentials; DB out of disk or under lock; saving an in-memory-only entry with null ObjectId; transient DB outage mid-save.","solutions":["Inspect e.getCause() (KettleDatabaseException) for the SQL failure","Verify repository write privileges and database health","Ensure the entry belongs to a persisted job with a valid ObjectId","Retry the save once connectivity is restored"],"exampleFix":"// before\nentry.saveRep(rep, metaStore, idJob);\n// after\ntry {\n  entry.saveRep(rep, metaStore, idJob);\n} catch (KettleException e) {\n  logError(\"Delay save failed: \" + (e.getCause() != null ? e.getCause().getMessage() : e.getMessage()));\n  throw e;\n}","handlingStrategy":"try-catch","validationCode":"// before saveRep\nif (rep.isReadOnly()) throw new IllegalStateException(\"Repository is read-only\");\nif (entry.getObjectId() == null) throw new IllegalStateException(\"Entry must be assigned a valid ObjectId before save\");","typeGuard":null,"tryCatchPattern":"try {\n  entry.saveRep(rep, metaStore, idJob);\n} catch (KettleException e) {\n  log.error(\"JobEntryDelay save failed (id_job=\" + idJob + \")\", e.getCause());\n  if (e.getCause() instanceof KettleDatabaseException) {\n    // check privileges/disk/connection, then retry\n  }\n  throw e;\n}","preventionTips":["Use repository accounts with write access","Ensure entries belong to a persisted job before saveRep","Add retry with backoff for transient DB failures","Monitor repository DB health"],"tags":["kettle","repository","persistence"],"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"}