{"record":{"id":"f6eb1477cf96dc67","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-job-entry-of-type-sftpput-to-the-repository","errorCode":null,"errorMessage":"Unable to load job entry of type 'SFTPPUT' to the repository for id_job=","messagePattern":"Unable to load job entry of type 'SFTPPUT' to the repository for id_job=","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/put-file-sftp/impl/src/main/java/org/pentaho/di/job/entries/sftpput/JobEntrySFTPPUT.java","lineNumber":351,"sourceCode":"      rep.saveJobEntryAttribute( id_job, getObjectId(), \"keyfilename\", keyfilename );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"keyfilepass\", Encr\n        .encryptPasswordIfNotUsingVariables( keyfilepass ) );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"compression\", compression );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"proxyType\", proxyType );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"proxyHost\", proxyHost );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"proxyPort\", proxyPort );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"proxyUsername\", proxyUsername );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"proxyPassword\", Encr\n        .encryptPasswordIfNotUsingVariables( proxyPassword ) );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"aftersftpput\", getAfterSFTPPutCode( getAfterFTPS() ) );\n\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"createRemoteFolder\", createRemoteFolder );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"destinationfolder\", destinationfolder );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"createdestinationfolder\", createDestinationFolder );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"successWhenNoFile\", successWhenNoFile );\n\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( \"Unable to load job entry of type 'SFTPPUT' to the repository for id_job=\"\n        + id_job, dbe );\n    }\n  }\n\n  /**\n   * @param createDestinationFolder\n   *          The create destination folder flag to set.\n   */\n  public void setCreateDestinationFolder( boolean createDestinationFolder ) {\n    this.createDestinationFolder = createDestinationFolder;\n  }\n\n  /**\n   * @return Returns the create destination folder flag\n   */\n  public boolean isCreateDestinationFolder() {\n    return createDestinationFolder;\n  }","sourceCodeStart":333,"sourceCodeEnd":369,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/put-file-sftp/impl/src/main/java/org/pentaho/di/job/entries/sftpput/JobEntrySFTPPUT.java#L333-L369","documentation":"In JobEntrySFTPPUT.saveRep, when any of the saveJobEntryAttribute calls fails at the database level, the KettleDatabaseException is wrapped in a KettleException with this message (the message text says 'load' but the code is actually saving — a copy-paste mislabel in this legacy entry). The repository write for the SFTP PUT job entry attributes could not be persisted.","triggerScenarios":"Calling saveRep on a JobEntrySFTPPUT while the repository connection is broken, the r_job_entry_attribute table is missing/corrupt, a constraint is violated, or the id_job/objectId is invalid.","commonSituations":"Saving a job whose repository connection dropped mid-save; DB user lacking INSERT/UPDATE rights on kettle attribute tables; migrating metadata between repositories with schema drift.","solutions":["Check the repository database connection and retry the save","Verify the DB user has write privileges on the kettle attribute tables","Inspect the wrapped KettleDatabaseException cause for the exact SQL failure","Repair/upgrade the repository schema (r_job_entry_attribute) if it is missing columns"],"exampleFix":"// before\nrep.saveJobEntryAttribute( id_job, getObjectId(), \"destinationfolder\", destinationfolder );\n// after — ensure a live repository first\nif ( rep == null || getObjectId() == null ) {\n  throw new KettleException( \"No repository connection or object id; cannot save SFTPPUT entry\" );\n}\nrep.saveJobEntryAttribute( id_job, getObjectId(), \"destinationfolder\", destinationfolder );","handlingStrategy":"try-catch","validationCode":"// Java\nif ( rep == null ) throw new KettleException( \"Repository is null; connect before saving\" );\nif ( getObjectId() == null ) throw new KettleException( \"Job entry not persisted yet; id is null\" );","typeGuard":null,"tryCatchPattern":"try {\n  jobEntry.saveRep( rep, metaStore, id_job );\n} catch ( KettleException e ) {\n  logError( \"Repository save failed: \" + e.getCause(), e );\n  throw e;\n}","preventionTips":["Verify repository connectivity before saving metadata","Ensure DB account has write access to kettle attribute tables","Keep repository schema up to date with the PDI version"],"tags":["kettle","repository","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"}