{"record":{"id":"f8b3b8e65957957b","repo":"pentaho/pentaho-kettle","slug":"jobpgpdecryptfiles-error-exception-unablesaverep","errorCode":null,"errorMessage":"JobPGPDecryptFiles.Error.Exception.UnableSaveRep","messagePattern":"JobPGPDecryptFiles\\.Error\\.Exception\\.UnableSaveRep","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/pgpdecryptfiles/JobEntryPGPDecryptFiles.java","lineNumber":358,"sourceCode":"      rep\n        .saveJobEntryAttribute(\n          id_job, getObjectId(), \"AddMovedDateBeforeExtension\", AddMovedDateBeforeExtension );\n\n      // save the arguments...\n      if ( source_filefolder != null ) {\n        for ( int i = 0; i < source_filefolder.length; i++ ) {\n          rep.saveJobEntryAttribute( id_job, getObjectId(), i, \"source_filefolder\", source_filefolder[i] );\n          rep.saveJobEntryAttribute( id_job, getObjectId(), i, \"passphrase\", Encr\n            .encryptPasswordIfNotUsingVariables( passphrase[i] ) );\n          rep\n            .saveJobEntryAttribute(\n              id_job, getObjectId(), i, \"destination_filefolder\", destination_filefolder[i] );\n          rep.saveJobEntryAttribute( id_job, getObjectId(), i, \"wildcard\", wildcard[i] );\n        }\n      }\n    } catch ( KettleDatabaseException dbe ) {\n\n      throw new KettleException( BaseMessages.getString( PKG, \"JobPGPDecryptFiles.Error.Exception.UnableSaveRep\" )\n        + id_job, dbe );\n    }\n  }\n\n  public Result execute( Result previousResult, int nr ) throws KettleException {\n    try {\n      Result result = previousResult;\n      List<RowMetaAndData> rows = result.getRows();\n      RowMetaAndData resultRow = null;\n      result.setNrErrors( 1 );\n      result.setResult( false );\n\n      NrErrors = 0;\n      NrSuccess = 0;\n      successConditionBroken = false;\n      successConditionBrokenExit = false;\n      limitFiles = Const.toInt( environmentSubstitute( getNrErrorsLessThan() ), 10 );\n","sourceCodeStart":340,"sourceCodeEnd":376,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/pgpdecryptfiles/JobEntryPGPDecryptFiles.java#L340-L376","documentation":"Thrown by JobEntryPGPDecryptFiles.saveRep when saving the entry's per-file attributes (passphrase, destination_filefolder, wildcard) to the repository fails with a KettleDatabaseException. It identifies the entry by id_job and wraps the underlying DB error.","triggerScenarios":"rep.saveJobEntryAttribute(id_job, getObjectId(), i, ...) throws during saveRep — DB connection dropped, column length exceeded, transaction failed, or schema version mismatch.","commonSituations":"Repository database outage or network blip during job save; very long file lists or oversized values exceeding VALUE_STR column size; stale repository schema after upgrade; concurrent writes causing deadlock.","solutions":["Retry the save after confirming repository DB connectivity.","Check the wrapped KettleDatabaseException for the exact SQL error (constraint/size/lock).","Shorten or split oversized attribute values (e.g. long wildcard lists).","Upgrade the repository schema to match the Pentaho version."],"exampleFix":"// before\nrep.saveJobEntryAttribute( id_job, getObjectId(), i, \"wildcard\", wildcard[i] );\n// after: guard oversized values\nString wc = wildcard[i] != null && wildcard[i].length() > 2000 ? wildcard[i].substring( 0, 2000 ) : wildcard[i];\nrep.saveJobEntryAttribute( id_job, getObjectId(), i, \"wildcard\", wc );","handlingStrategy":"try-catch","validationCode":"// pre-check oversized attribute values\nfor ( String wc : wildcard ) {\n  if ( wc != null && wc.length() > 2000 ) throw new IllegalArgumentException( \"Wildcard too long for repository column\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  jobEntry.saveRep( rep, metaStore, id_job );\n} catch ( KettleException e ) {\n  logError( \"Repository save failed for PGP entry: \" + e.getCause().getMessage(), e );\n  // retry with backoff or warn user to shorten values\n}","preventionTips":["Keep attribute values within repository column sizes.","Retry saves on transient DB failures.","Upgrade repository schema before saving from newer clients.","Watch for deadlocks when many users save concurrently."],"tags":["database","repository","persistence","pgp"],"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"}