pentaho/pentaho-kettle · error · KettleException
Unable to save job entry of type 'SFTP' to the repository…
Error message
Unable to save job entry of type 'SFTP' to the repository for id_job=
What it means
JobEntrySFTP.saveRep() throws this KettleException when writing the SFTP entry's attributes (server, port, credentials, proxy fields, including encrypted password) to the repository fails with a KettleDatabaseException. The message is "Unable to save job entry of type 'SFTP' to the repository for id_job=" + id_job, with the database exception as cause — a repository persistence failure, not an SFTP connectivity issue.
Solutions
- Check the cause KettleDatabaseException for the SQL error and resolve the repository-side problem (connection, privileges, space).
- Grant the repository user write access to the job entry attribute tables.
- Retry saving after restoring the repository connection; use Repository::test in Spoon to verify first.
- If corruption persists, recreate the entry in a fresh job and re-save.
Example fix
// before: assuming save always succeeds jobEntry.saveRep( rep, metaStore, id_job ); // after: guard with a connection check if ( !rep.isConnected() ) throw new KettleException( "Repository not connected; cannot save SFTP entry" ); jobEntry.saveRep( rep, metaStore, id_job );
Defensive patterns
Strategy: try-catch
Validate before calling
if ( !rep.isConnected() ) throw new KettleException( "Repository not connected; cannot save SFTP entry" );
Try / catch
try {
entry.saveRep( rep, metaStore, id_job );
} catch ( KettleException e ) {
log.error( "SFTP entry repo save failed: " + e.getCause() );
throw new KettleException( "Resolve repository DB issue (connection/privileges) and retry", e );
} Prevention
- Verify repository write access for the DB user.
- Test the repository connection before bulk saves.
- Watch for DB disk-full or read-only maintenance windows.
- Retry saves once after transient connectivity errors before escalating.
When it happens
Trigger: Saving a job containing the SFTP entry when the repository write fails: broken DB connection, read-only database, insufficient INSERT/UPDATE privileges on r_jobentry_attribute, constraint violations, or transaction rollback.
Common situations: Repository database offline or network interruption during save; user lacks write rights to repository tables; disk full on the DB server; save conflicts from concurrent edits.
Related errors
- JobFTPSPUT.UnableToSaveToRepo
- SyslogMessageMeta.Exception.UnableToSaveStepInfo
- Unable to load job entry of type 'SFTP' from the repository…
- AbsSecurityProvider.ERROR_0002_UNABLE_TO_ACCESS_IS_ALLOWED
- AccessInputMeta.Exception.ErrorReadingRepository
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/3fee2e77beac437a.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/get-file-sftp/impl/src/main/java/org/pentaho/di/job/entries/sftp/JobEntrySFTP.java:272
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 );
rep.saveJobEntryAttribute( id_job, getObjectId(), "usekeyfilename", usekeyfilename );
rep.saveJobEntryAttribute( id_job, getObjectId(), "keyfilename", keyfilename );
rep.saveJobEntryAttribute( id_job, getObjectId(), "keyfilepass", Encr
.encryptPasswordIfNotUsingVariables( keyfilepass ) );
rep.saveJobEntryAttribute( id_job, getObjectId(), "compression", compression );
rep.saveJobEntryAttribute( id_job, getObjectId(), "proxyType", proxyType );
rep.saveJobEntryAttribute( id_job, getObjectId(), "proxyHost", proxyHost );
rep.saveJobEntryAttribute( id_job, getObjectId(), "proxyPort", proxyPort );
rep.saveJobEntryAttribute( id_job, getObjectId(), "proxyUsername", proxyUsername );
rep.saveJobEntryAttribute( id_job, getObjectId(), "proxyPassword", Encr
.encryptPasswordIfNotUsingVariables( proxyPassword ) );
} catch ( KettleDatabaseException dbe ) {
throw new KettleException(
"Unable to save job entry of type 'SFTP' to the repository for id_job=" + id_job, dbe );
}
}
/**
* @return Returns the directory.
*/
public String getScpDirectory() {
return sftpDirectory;
}
/**
* @param directory
* The directory to set.
*/
public void setScpDirectory( String directory ) {
this.sftpDirectory = directory;
}View on GitHub (pinned to f3058517a1)