{"record":{"id":"2f695a2d9653326b","repo":"pentaho/pentaho-kettle","slug":"unable-to-save-job-entry-of-type-create-folder-to-the-2f695a","errorCode":null,"errorMessage":"Unable to save job entry of type 'create Folder' to the repository for id_job=","messagePattern":"Unable to save job entry of type 'create Folder' to the repository for id_job=","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/folderisempty/JobEntryFolderIsEmpty.java","lineNumber":134,"sourceCode":"      foldername = rep.getJobEntryAttributeString( id_jobentry, \"foldername\" );\n      includeSubfolders = rep.getJobEntryAttributeBoolean( id_jobentry, \"include_subfolders\" );\n      specifywildcard = rep.getJobEntryAttributeBoolean( id_jobentry, \"specify_wildcard\" );\n      wildcard = rep.getJobEntryAttributeString( id_jobentry, \"wildcard\" );\n    } catch ( KettleException dbe ) {\n      throw new KettleException(\n        \"Unable to load job entry of type 'create Folder' from the repository for id_jobentry=\" + id_jobentry,\n        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(), \"foldername\", foldername );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"include_subfolders\", includeSubfolders );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"specify_wildcard\", specifywildcard );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"wildcard\", wildcard );\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( \"Unable to save job entry of type 'create Folder' to the repository for id_job=\"\n        + id_job, dbe );\n    }\n  }\n\n  public void setSpecifyWildcard( boolean specifywildcard ) {\n    this.specifywildcard = specifywildcard;\n  }\n\n  public boolean isSpecifyWildcard() {\n    return specifywildcard;\n  }\n\n  public void setFoldername( String foldername ) {\n    this.foldername = foldername;\n  }\n\n  public String getFoldername() {\n    return foldername;","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/folderisempty/JobEntryFolderIsEmpty.java#L116-L152","documentation":"Thrown by JobEntryFolderIsEmpty.saveRep when saving the entry's attributes (foldername, include_subfolders, specify_wildcard, wildcard) to the repository fails with a KettleDatabaseException. The exception is wrapped with the id_job for identification. It means the 'Folder is empty' job entry state could not be persisted.","triggerScenarios":"Calling saveRep on a JobEntryFolderIsEmpty when rep.saveJobEntryAttribute throws KettleDatabaseException — e.g. repository DB down, constraint violation, read-only repository, or transaction rollback during job save.","commonSituations":"Repository database connection lost while saving a job in Spoon; repository storage full or locked; saving to a read-only replica; schema mismatch after a Pentaho upgrade.","solutions":["Check the cause KettleDatabaseException for the underlying SQL error and fix the repository DB (connectivity, locks, constraints).","Verify the repository is writable and the user has INSERT/UPDATE rights on r_jobentry_attribute.","Retry the save after restoring the DB connection; the job in memory is still intact.","As a workaround, export the job to XML (file) instead of the repository."],"exampleFix":"// before\njobEntry.saveRep(rep, metaStore, idJob);\n// after\ntry {\n  jobEntry.saveRep(rep, metaStore, idJob);\n} catch (KettleException e) {\n  logError(\"Save failed for id_job=\" + idJob + \": \" + e.getCause().getMessage());\n  // prompt user to check repository connection, then retry\n}","handlingStrategy":"try-catch","validationCode":"// ensure repository is reachable and writable before saving\nif (!rep.connect()) {\n  throw new KettleException(\"Repository not connected; cannot save job\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  entry.saveRep(rep, metaStore, idJob);\n} catch (KettleException e) {\n  logError(\"Save failed: \" + e.getCause().getMessage());\n  // offer XML export fallback and retry after reconnect\n}","preventionTips":["Verify DB connectivity and write permissions before bulk saves.","Monitor repository storage and lock contention.","Schedule repository maintenance windows for schema upgrades.","Periodically export jobs to XML as a backup."],"tags":["kettle","repository","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"}