{"record":{"id":"f67c6dacf1310496","repo":"pentaho/pentaho-kettle","slug":"jobentryabort-unabletosavetorepo-label","errorCode":null,"errorMessage":"JobEntryAbort.UnableToSaveToRepo.Label","messagePattern":"JobEntryAbort\\.UnableToSaveToRepo\\.Label","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/core/impl/src/main/java/org/pentaho/di/job/entries/abort/JobEntryAbort.java","lineNumber":106,"sourceCode":"\n  public void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,\n    List<SlaveServer> slaveServers ) throws KettleException {\n    try {\n      messageAbort = rep.getJobEntryAttributeString( id_jobentry, \"message\" );\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"JobEntryAbort.UnableToLoadFromRepo.Label\", String\n        .valueOf( id_jobentry ) ), dbe );\n    }\n  }\n\n  // Save the attributes of this job entry\n  //\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {\n    try {\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"message\", messageAbort );\n\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"JobEntryAbort.UnableToSaveToRepo.Label\", String\n        .valueOf( id_job ) ), dbe );\n    }\n  }\n\n  public boolean evaluate( Result result ) {\n    String Returnmessage = null;\n    String RealMessageabort = environmentSubstitute( getMessageabort() );\n\n    try {\n      // Return False\n      if ( RealMessageabort == null ) {\n        Returnmessage = BaseMessages.getString( PKG, \"JobEntryAbort.Meta.CheckResult.Label\" );\n      } else {\n        Returnmessage = RealMessageabort;\n\n      }\n      logError( Returnmessage );\n      result.setNrErrors( 1 );","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/core/impl/src/main/java/org/pentaho/di/job/entries/abort/JobEntryAbort.java#L88-L124","documentation":"JobEntryAbort.saveRep wraps KettleDatabaseException from persisting the 'message' attribute to the repository into a KettleException keyed 'JobEntryAbort.UnableToSaveToRepo.Label' with the job id. It means the abort job entry could not be saved to the repository database.","triggerScenarios":"saveRep during job save when rep.saveJobEntryAttribute for 'message' throws — DB connection loss, constraint violation, read-only repository, or schema mismatch.","commonSituations":"Repository outage during save; insufficient repository write permissions; client/repository schema version mismatch; very long message exceeding column size.","solutions":["Verify repository DB connectivity and write permissions","Shorten the abort message if it exceeds the attribute column size","Save the job locally (.kjb) as a fallback and retry repository save later","Inspect the wrapped KettleDatabaseException for the failing SQL/constraint"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"if ( rep.isReadOnly() ) {\n  throw new ValidationException( \"Repository is read-only; save will fail\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  jobMeta.saveToRepository( rep, null );\n} catch ( KettleException e ) {\n  if ( e.getCause() instanceof KettleDatabaseException ) {\n    jobMeta.saveToFile( \"/tmp/backup.kjb\", \"none\", \"none\" ); // local fallback\n  }\n}","preventionTips":["Confirm repository write access before saving","Keep abort messages within attribute column size limits","Reconnect dropped DB sessions before retrying saves","Maintain local .kjb fallbacks"],"tags":["repository","database","job-entry","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"}