{"record":{"id":"d319671fcf6131c5","repo":"pentaho/pentaho-kettle","slug":"jobentryzipfile-unablesavejobentryrep","errorCode":null,"errorMessage":"JobEntryZipFile.UnableSaveJobEntryRep","messagePattern":"JobEntryZipFile\\.UnableSaveJobEntryRep","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/zipfile/JobEntryZipFile.java","lineNumber":242,"sourceCode":"      rep.saveJobEntryAttribute( id_job, getObjectId(), \"compressionrate\", compressionRate );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"ifzipfileexists\", ifZipFileExists );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"afterzip\", afterZip );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"wildcard\", wildCard );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"wildcardexclude\", excludeWildCard );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"sourcedirectory\", sourceDirectory );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"movetodirectory\", movetoDirectory );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"addfiletoresult\", addFileToResult );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"isfromprevious\", isFromPrevious );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"createparentfolder\", createParentFolder );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"addtime\", addTime );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"adddate\", addDate );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"SpecifyFormat\", specifyFormat );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"date_time_format\", dateTimeFormat );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"createMoveToDirectory\", createMoveToDirectory );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"include_subfolders\", includingSubFolders );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"stored_source_path_depth\", storedSourcePathDepth );\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( BaseMessages\n        .getString( PKG, \"JobEntryZipFile.UnableSaveJobEntryRep\", \"\" + id_job ), dbe );\n    }\n  }\n\n  private boolean createParentFolder( String filename ) {\n    // Only create the parent directory of the zip file, not the file itself\n    boolean result = false;\n    FileObject parentfolder = null;\n    try {\n      FileObject zipFileObject = KettleVFS.getInstance( parentJobMeta.getBowl() ).getFileObject( filename, this );\n      parentfolder = zipFileObject.getParent();\n      if ( parentfolder != null && !parentfolder.exists() ) {\n        if ( log.isDetailed() ) {\n          logDetailed( BaseMessages.getString( PKG, \"JobEntryZipFile.CanNotFindFolder\", \"\"\n            + parentfolder.getName() ) );\n        }\n        parentfolder.createFolder();\n        if ( log.isDetailed() ) {","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/zipfile/JobEntryZipFile.java#L224-L260","documentation":"JobEntryZipFile.saveRep() throws this KettleException when saving the zip job entry's attributes to the repository fails with a KettleDatabaseException. The job id is included in the message and the DB exception is the cause.","triggerScenarios":"Calling saveRep when the repository insert/update of attributes ('SpecifyFormat', 'date_time_format', 'createMoveToDirectory', 'include_subfolders', 'stored_source_path_depth') fails: DB down, constraint violation, lock contention, or insufficient privileges.","commonSituations":"Read-only repository database; lock from a concurrent Spoon session editing the same job; repository schema out of date; DB server disk full.","solutions":["Check repository DB health (connectivity, privileges, disk space) and the cause KettleDatabaseException","Retry the save after resolving concurrent-edit locks","Update the repository schema to match your PDI version","Reconnect to the repository and re-save the job"],"exampleFix":"// before: save fails on locked rows\nrep.saveJobEntryAttribute( id_job, getObjectId(), \"SpecifyFormat\", specifyFormat );\n// after: retry with backoff\nfor ( int i = 0; i < 3; i++ ) { try { rep.saveJobEntryAttribute( id_job, getObjectId(), \"SpecifyFormat\", specifyFormat ); break; } catch ( KettleException e ) { Thread.sleep( 1000L * ( i + 1 ) ); } }","handlingStrategy":"try-catch","validationCode":"// pre-check writable repository\nif ( rep.isReadOnly() ) throw new KettleException( \"Repository is read-only\" );\nif ( id_job == null || getObjectId() == null ) throw new KettleException( \"Save job before entry attributes\" );","typeGuard":null,"tryCatchPattern":"try {\n  jobEntry.saveRep( rep, metaStore, id_job );\n} catch ( KettleException e ) {\n  logError( \"Failed saving zip entry attributes: \" + e.getCause(), e );\n  // optionally retry with backoff for transient DB issues\n}","preventionTips":["Save the job itself before saving entries so ObjectIds exist","Commit repository transactions promptly to avoid lock timeouts","Keep repository schema and DB credentials current"],"tags":["database","repository","pdi","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"}