{"record":{"id":"5da90fcbe15fa819","repo":"pentaho/pentaho-kettle","slug":"jobfolderscompare-meta-unablesaverep","errorCode":null,"errorMessage":"JobFoldersCompare.Meta.UnableSaveRep","messagePattern":"JobFoldersCompare\\.Meta\\.UnableSaveRep","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/folderscompare/JobEntryFoldersCompare.java","lineNumber":171,"sourceCode":"      filename2 = rep.getJobEntryAttributeString( id_jobentry, \"filename2\" );\n    } catch ( KettleException dbe ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"JobFoldersCompare.Meta.UnableLoadRep\", \"\"\n        + id_jobentry, dbe.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(), \"include_subfolders\", includesubfolders );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"compare_filecontent\", comparefilecontent );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"compare_filesize\", comparefilesize );\n\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"compareonly\", compareonly );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"wildcard\", wildcard );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"filename1\", filename1 );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"filename2\", filename2 );\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"JobFoldersCompare.Meta.UnableSaveRep\", \"\" + id_job, dbe.getMessage() ) );\n    }\n  }\n\n  public void setIncludeSubfolders( boolean includeSubfolders ) {\n    this.includesubfolders = includeSubfolders;\n  }\n\n  public boolean isIncludeSubfolders() {\n    return includesubfolders;\n  }\n\n  public void setCompareFileContent( boolean comparefilecontent ) {\n    this.comparefilecontent = comparefilecontent;\n  }\n\n  public boolean isCompareFileContent() {\n    return comparefilecontent;","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/folderscompare/JobEntryFoldersCompare.java#L153-L189","documentation":"Thrown by JobEntryFoldersCompare.saveRep when persisting the entry's attributes (compareonly, wildcard, filename1, filename2) fails with a KettleDatabaseException. The message is a localized bundle key formatted with id_job and the cause's message. It means the 'Compare Folders' entry state could not be saved to the repository.","triggerScenarios":"Calling saveRep on JobEntryFoldersCompare when rep.saveJobEntryAttribute throws KettleDatabaseException — DB down, constraint violation, read-only repository, transaction failure while saving the job.","commonSituations":"Repository database connection dropped mid-save; storage quota exceeded; saving with insufficient DB permissions; upgrade-induced schema mismatch on r_jobentry_attribute.","solutions":["Read dbe.getMessage() in the wrapped exception for the root SQL error and fix the repository DB issue.","Confirm write permissions on the repository tables for the connecting user.","Retry the save after restoring connectivity; alternatively save the job as XML.","Check for DB locks or quota issues on the repository host."],"exampleFix":"// before\nentry.saveRep(rep, metaStore, idJob);\n// after\ntry {\n  entry.saveRep(rep, metaStore, idJob);\n} catch (KettleException e) {\n  logError(\"FoldersCompare save failed: \" + e.getMessage());\n  // check repository connection, retry\n}","handlingStrategy":"try-catch","validationCode":"// check write access before saving\nif (!rep.getConnection().isReadOnly() == false) {\n  throw new KettleException(\"Repository is read-only\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  entry.saveRep(rep, metaStore, idJob);\n} catch (KettleException e) {\n  logError(\"Save failed: \" + e.getMessage());\n  // inspect SQL cause, fix DB, then retry\n}","preventionTips":["Grant INSERT/UPDATE rights on repository tables to the integration user.","Watch for DB quota and lock issues during batch saves.","Test repository writes after every schema upgrade.","Fall back to XML export when the repository is unavailable."],"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"}