{"record":{"id":"223d418a067b9a6c","repo":"pentaho/pentaho-kettle","slug":"unable-to-save-job-entry-of-type-create-file-to-the-223d41","errorCode":null,"errorMessage":"Unable to save job entry of type 'create file' to the repository for id_job=","messagePattern":"Unable to save job entry of type 'create file' to the repository for id_job=","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/writetofile/JobEntryWriteToFile.java","lineNumber":138,"sourceCode":"      createParentFolder = rep.getJobEntryAttributeBoolean( id_jobentry, \"createParentFolder\" );\n      appendFile = rep.getJobEntryAttributeBoolean( id_jobentry, \"appendFile\" );\n      content = rep.getJobEntryAttributeString( id_jobentry, \"content\" );\n      encoding = rep.getJobEntryAttributeString( id_jobentry, \"encoding\" );\n    } catch ( KettleException dbe ) {\n      throw new KettleException(\n        \"Unable to load job entry of type 'create file' 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(), \"filename\", filename );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"createParentFolder\", createParentFolder );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"appendFile\", appendFile );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"content\", content );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"encoding\", encoding );\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( \"Unable to save job entry of type 'create file' to the repository for id_job=\"\n        + 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 void setContent( String content ) {\n    this.content = content;\n  }\n\n  public String getContent() {\n    return content;","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/writetofile/JobEntryWriteToFile.java#L120-L156","documentation":"KettleException thrown by JobEntryWriteToFile.saveRep when saving the entry's attributes to the repository fails with a KettleDatabaseException. The message includes id_job and the DB error is chained. The entry configuration was not persisted.","triggerScenarios":"Calling saveRep when the repository write fails — DB unavailable, read-only mode, constraint violation, or content exceeding column size.","commonSituations":"Saving during a repository outage; very large content values exceeding column limits; repository disk full; schema mismatch after upgrades.","solutions":["Check repository connectivity and write permissions","Inspect the chained KettleDatabaseException for the SQL failure cause","Shorten content or verify column sizes match your data","Retry the save after the repository is fixed"],"exampleFix":"// before\nentry.saveRep(rep, metaStore, idJob); // throws\n// after\ntry {\n  entry.saveRep(rep, metaStore, idJob);\n} catch (KettleException e) {\n  logError(\"Cannot save write-to-file entry: \" + e.getCause(), e);\n}","handlingStrategy":"try-catch","validationCode":"if (rep == null || idJob == null) throw new IllegalArgumentException(\"repository and id_job required\");\nif (content != null && content.length() > 1000000) throw new IllegalArgumentException(\"content exceeds repository column size\");","typeGuard":null,"tryCatchPattern":"try {\n  entry.saveRep(rep, metaStore, idJob);\n} catch (KettleException e) {\n  logError(\"SaveRep failed: \" + e.getCause(), e);\n}","preventionTips":["Keep content within repository column limits","Verify DB connectivity/write access before saving","Fix schema mismatches immediately after Pentaho upgrades"],"tags":["kettle","repository","save","database"],"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"}