{"record":{"id":"3d60172363963ee4","repo":"pentaho/pentaho-kettle","slug":"error-0003-cannot-save-job-entry","errorCode":"ERROR_0003_Cannot_Save_Job_Entry","errorMessage":"JobEntryFileExists.ERROR_0003_Cannot_Save_Job_Entry","messagePattern":"JobEntryFileExists\\.ERROR_0003_Cannot_Save_Job_Entry","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/fileexists/JobEntryFileExists.java","lineNumber":113,"sourceCode":"        PKG, \"JobEntryFileExists.ERROR_0001_Cannot_Load_Job_Entry_From_Xml_Node\" ), xe );\n    }\n  }\n\n  public void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,\n    List<SlaveServer> slaveServers ) throws KettleException {\n    try {\n      filename = rep.getJobEntryAttributeString( id_jobentry, \"filename\" );\n    } catch ( KettleException dbe ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"JobEntryFileExists.ERROR_0002_Cannot_Load_Job_From_Repository\", 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(), \"filename\", filename );\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"JobEntryFileExists.ERROR_0003_Cannot_Save_Job_Entry\", id_job ), dbe );\n    }\n  }\n\n  public void setFilename( String filename ) {\n    this.filename = filename;\n  }\n\n  public String getFilename() {\n    return filename;\n  }\n\n  public String getRealFilename() {\n    return environmentSubstitute( getFilename() );\n  }\n\n  public Result execute( Result previousResult, int nr ) {\n    Result result = previousResult;","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/fileexists/JobEntryFileExists.java#L95-L131","documentation":"Thrown by JobEntryFileExists.saveRep when saving the 'filename' attribute of this job entry to the repository fails. The KettleDatabaseException is wrapped with a localized message carrying the job id. The entry was not persisted.","triggerScenarios":"Calling saveRep during a job save when the repository insert/update of the 'filename' attribute throws KettleDatabaseException (connection failure, constraint, permissions).","commonSituations":"Repository DB unreachable; read-only credentials; duplicate/constraint violation in r_jobentry_attribute; concurrent edit conflicts.","solutions":["Retry the save after confirming repository DB availability","Check DB write privileges for the repository user","Inspect the wrapped KettleDatabaseException for the SQL error detail","Resolve concurrent sessions editing the same job"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Pre-save sanity: filename must be set and repository writable\nif (filename == null || filename.isEmpty()) { throw new IllegalStateException(\"filename not set\"); }","typeGuard":null,"tryCatchPattern":"try {\n    jobMeta.saveRep(rep, metaStore, id_job);\n} catch (KettleException e) {\n    logError(\"Save failed: \" + e.getMessage(), e);\n    // preserve JobMeta state and surface a retry to the user\n}","preventionTips":["Verify repository credentials have write access","Check DB constraint definitions on r_jobentry_attribute","Serialize saves through one Spoon session per job"],"tags":["repository","database","save"],"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"}