{"record":{"id":"18b727f7b2e928a2","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-job-entry-of-type-sftp-from-the-repository","errorCode":null,"errorMessage":"Unable to load job entry of type 'SFTP' from the repository for id_jobentry=","messagePattern":"Unable to load job entry of type 'SFTP' from the repository for id_jobentry=","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/get-file-sftp/impl/src/main/java/org/pentaho/di/job/entries/sftp/JobEntrySFTP.java","lineNumber":239,"sourceCode":"\n      createtargetfolder = rep.getJobEntryAttributeBoolean( id_jobentry, \"createtargetfolder\" );\n      copyprevious = rep.getJobEntryAttributeBoolean( id_jobentry, \"copyprevious\" );\n\n      usekeyfilename = rep.getJobEntryAttributeBoolean( id_jobentry, \"usekeyfilename\" );\n      keyfilename = rep.getJobEntryAttributeString( id_jobentry, \"keyfilename\" );\n      keyfilepass =\n        Encr.decryptPasswordOptionallyEncrypted( rep.getJobEntryAttributeString( id_jobentry, \"keyfilepass\" ) );\n      compression = rep.getJobEntryAttributeString( id_jobentry, \"compression\" );\n\n      proxyType = rep.getJobEntryAttributeString( id_jobentry, \"proxyType\" );\n      proxyHost = rep.getJobEntryAttributeString( id_jobentry, \"proxyHost\" );\n      proxyPort = rep.getJobEntryAttributeString( id_jobentry, \"proxyPort\" );\n      proxyUsername = rep.getJobEntryAttributeString( id_jobentry, \"proxyUsername\" );\n      proxyPassword =\n        Encr.decryptPasswordOptionallyEncrypted( rep.getJobEntryAttributeString( id_jobentry, \"proxyPassword\" ) );\n\n    } catch ( KettleException dbe ) {\n      throw new KettleException( \"Unable to load job entry of type 'SFTP' from the repository for id_jobentry=\"\n        + id_jobentry, 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(), \"servername\", serverName );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"serverport\", serverPort );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"username\", userName );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"password\", Encr\n        .encryptPasswordIfNotUsingVariables( password ) );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"sftpdirectory\", sftpDirectory );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"targetdirectory\", targetDirectory );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"wildcard\", wildcard );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"remove\", remove );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"isaddresult\", isaddresult );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"createtargetfolder\", createtargetfolder );\n      rep.saveJobEntryAttribute( id_job, getObjectId(), \"copyprevious\", copyprevious );","sourceCodeStart":221,"sourceCodeEnd":257,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/get-file-sftp/impl/src/main/java/org/pentaho/di/job/entries/sftp/JobEntrySFTP.java#L221-L257","documentation":"JobEntrySFTP.loadRep() throws this KettleException when reading the SFTP entry's attributes from the Kettle repository fails. Any KettleException from rep.getJobEntryAttributeString(...) is rethrown with the message \"Unable to load job entry of type 'SFTP' from the repository for id_jobentry=\" + id_jobentry and the database exception as cause. It signals missing or unreadable attribute rows for that entry id.","triggerScenarios":"Loading an SFTP job entry by ObjectId where r_jobentry_attribute rows are absent/corrupt, the repository read fails (connection error, permission), or the id_jobentry does not correspond to a valid SFTP entry row set.","commonSituations":"Repository upgrades that altered attribute storage; rows deleted manually or by failed transactions; pointing at the wrong repository/database; broken repository DB connections.","solutions":["Read the cause for the underlying SQL/repository error and restore repository connectivity.","Verify r_jobentry_attribute rows exist for the id_jobentry; recreate the entry in Spoon if missing.","Confirm you are connected to the repository/database the job was saved in.","Re-save the job entry with the current plugin version to rewrite attributes in the expected format."],"exampleFix":"// before: loading without checking the entry exists\nentry.loadRep( rep, metaStore, id_jobentry, databases, slaveServers );\n// after\nif ( rep.getJobEntry( id_jobentry ) == null ) {\n  throw new KettleException( \"SFTP entry \" + id_jobentry + \" not found in repository\" );\n}\nentry.loadRep( rep, metaStore, id_jobentry, databases, slaveServers );","handlingStrategy":"try-catch","validationCode":"if ( !rep.isConnected() || rep.getJobEntry( id_jobentry ) == null ) {\n  throw new KettleException( \"SFTP entry \" + id_jobentry + \" unavailable in repository\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  entry.loadRep( rep, metaStore, id_jobentry, databases, slaveServers );\n} catch ( KettleException e ) {\n  log.error( \"SFTP entry repo load failed: \" + e.getCause() );\n  throw new KettleException( \"Verify repository connectivity and attribute rows, then reload\", e );\n}","preventionTips":["Test repository connectivity before loading jobs.","Run repository schema upgrade scripts after Pentaho upgrades.","Point environments at the correct repository database.","Recreate broken entries through Spoon rather than patching rows."],"tags":["kettle","sftp","repository","database"],"backgroundTag":"database-query-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"}