{"record":{"id":"2ba3f206e02c8b66","repo":"pentaho/pentaho-kettle","slug":"error-0003-cannot-save-job-entry-jobentryfilesexist","errorCode":"ERROR_0003_Cannot_Save_Job_Entry","errorMessage":"JobEntryFilesExist.ERROR_0003_Cannot_Save_Job_Entry","messagePattern":"JobEntryFilesExist\\.ERROR_0003_Cannot_Save_Job_Entry","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/filesexist/JobEntryFilesExist.java","lineNumber":160,"sourceCode":"    } catch ( KettleException dbe ) {\n      throw new KettleException( BaseMessages\n        .getString( PKG, \"JobEntryFilesExist.ERROR_0002_Cannot_Load_Job_From_Repository\", \"\" + id_jobentry, dbe\n          .getMessage() ) );\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\n      // save the arguments...\n      if ( arguments != null ) {\n        for ( int i = 0; i < arguments.length; i++ ) {\n          rep.saveJobEntryAttribute( id_job, getObjectId(), i, \"name\", arguments[i] );\n        }\n      }\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"JobEntryFilesExist.ERROR_0003_Cannot_Save_Job_Entry\", \"\" + id_job, dbe.getMessage() ) );\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[] getArguments() {\n    return arguments;\n  }\n\n  public void setArguments( String[] arguments ) {\n    this.arguments = arguments;","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/filesexist/JobEntryFilesExist.java#L142-L178","documentation":"Thrown by JobEntryFilesExist.saveRep when persisting the entry's argument list ('name' attribute per index) to the repository fails. The KettleDatabaseException is wrapped with a localized message containing the job id and dbe.getMessage(), without chaining the cause. The entry's file list was not saved.","triggerScenarios":"Calling saveRep during a job save when any rep.saveJobEntryAttribute(id_job, objectId, i, \"name\", arguments[i]) call throws KettleDatabaseException — connection loss, constraint violation, permissions.","commonSituations":"Repository DB unavailable during save; too many arguments causing a DB limit/constraint failure; read-only repository credentials; concurrent edit conflict.","solutions":["Check repository DB health and retry the save","Verify write privileges on r_jobentry_attribute","Read dbe.getMessage() (embedded in the thrown message) for the SQL failure","Reduce/verify the argument list and resolve any concurrent sessions"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Pre-save checks\nif (arguments == null || arguments.length == 0) { throw new IllegalStateException(\"no files configured\"); }\nif (rep.isReadOnly()) { throw new IllegalStateException(\"repository read-only\"); }","typeGuard":null,"tryCatchPattern":"try {\n    jobMeta.saveRep(rep, metaStore, id_job);\n} catch (KettleException e) {\n    logError(\"Save failed: \" + e.getMessage());\n    // message embeds dbe.getMessage(); retry or export to XML\n}","preventionTips":["Grant write privileges on r_jobentry_attribute","Watch for DB limits on per-row attribute counts with long file lists","Resolve concurrent Spoon sessions before saving","Keep repository connections validated"],"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"}