pentaho/pentaho-kettle · error · KettleException

Unable to load job entry of type 'SFTP' from the repository…

Error message

Unable to load job entry of type 'SFTP' from the repository for id_jobentry=

What it means

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.

Solutions

  1. Read the cause for the underlying SQL/repository error and restore repository connectivity.
  2. Verify r_jobentry_attribute rows exist for the id_jobentry; recreate the entry in Spoon if missing.
  3. Confirm you are connected to the repository/database the job was saved in.
  4. Re-save the job entry with the current plugin version to rewrite attributes in the expected format.

Example fix

// before: loading without checking the entry exists
entry.loadRep( rep, metaStore, id_jobentry, databases, slaveServers );
// after
if ( rep.getJobEntry( id_jobentry ) == null ) {
  throw new KettleException( "SFTP entry " + id_jobentry + " not found in repository" );
}
entry.loadRep( rep, metaStore, id_jobentry, databases, slaveServers );
Defensive patterns

Strategy: try-catch

Validate before calling

if ( !rep.isConnected() || rep.getJobEntry( id_jobentry ) == null ) {
  throw new KettleException( "SFTP entry " + id_jobentry + " unavailable in repository" );
}

Try / catch

try {
  entry.loadRep( rep, metaStore, id_jobentry, databases, slaveServers );
} catch ( KettleException e ) {
  log.error( "SFTP entry repo load failed: " + e.getCause() );
  throw new KettleException( "Verify repository connectivity and attribute rows, then reload", e );
}

Prevention

When it happens

Trigger: 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.

Common situations: Repository upgrades that altered attribute storage; rows deleted manually or by failed transactions; pointing at the wrong repository/database; broken repository DB connections.

Understand the failure class

Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/18b727f7b2e928a2. Report an issue: GitHub.

Appendix: source

Thrown at plugins/get-file-sftp/impl/src/main/java/org/pentaho/di/job/entries/sftp/JobEntrySFTP.java:239

      createtargetfolder = rep.getJobEntryAttributeBoolean( id_jobentry, "createtargetfolder" );
      copyprevious = rep.getJobEntryAttributeBoolean( id_jobentry, "copyprevious" );

      usekeyfilename = rep.getJobEntryAttributeBoolean( id_jobentry, "usekeyfilename" );
      keyfilename = rep.getJobEntryAttributeString( id_jobentry, "keyfilename" );
      keyfilepass =
        Encr.decryptPasswordOptionallyEncrypted( rep.getJobEntryAttributeString( id_jobentry, "keyfilepass" ) );
      compression = rep.getJobEntryAttributeString( id_jobentry, "compression" );

      proxyType = rep.getJobEntryAttributeString( id_jobentry, "proxyType" );
      proxyHost = rep.getJobEntryAttributeString( id_jobentry, "proxyHost" );
      proxyPort = rep.getJobEntryAttributeString( id_jobentry, "proxyPort" );
      proxyUsername = rep.getJobEntryAttributeString( id_jobentry, "proxyUsername" );
      proxyPassword =
        Encr.decryptPasswordOptionallyEncrypted( rep.getJobEntryAttributeString( id_jobentry, "proxyPassword" ) );

    } catch ( KettleException dbe ) {
      throw new KettleException( "Unable to load job entry of type 'SFTP' from the repository for id_jobentry="
        + id_jobentry, dbe );
    }
  }

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {
    try {
      rep.saveJobEntryAttribute( id_job, getObjectId(), "servername", serverName );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "serverport", serverPort );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "username", userName );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "password", Encr
        .encryptPasswordIfNotUsingVariables( password ) );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "sftpdirectory", sftpDirectory );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "targetdirectory", targetDirectory );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "wildcard", wildcard );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "remove", remove );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "isaddresult", isaddresult );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "createtargetfolder", createtargetfolder );
      rep.saveJobEntryAttribute( id_job, getObjectId(), "copyprevious", copyprevious );

View on GitHub (pinned to f3058517a1)