pentaho/pentaho-kettle · error · KettleException
JobEntryDeleteFolders.UnableToSaveToRepo
Error message
JobEntryDeleteFolders.UnableToSaveToRepo
What it means
Thrown when saving the 'Delete Folders' job entry's folder name arguments to the repository fails. saveRep() catches the KettleDatabaseException from rep.saveJobEntryAttribute() and rethrows as KettleException with the job id. The repository write of metadata failed.
Solutions
- Inspect the chained KettleDatabaseException for the underlying SQL error
- Ensure repository schema tables exist and are up to date (run upgrade scripts)
- Grant the repository user INSERT/UPDATE/DELETE on repository tables
- Retry the save; shorten folder names if a column-length error occurs
Example fix
// before
rep.saveJobEntryAttribute(id_job, getObjectId(), i, "name", arguments[i]); // fails silently until wrapped
// after
try {
rep.saveJobEntryAttribute(id_job, getObjectId(), i, "name", arguments[i]);
} catch (KettleDatabaseException dbe) {
throw new KettleException("Failed saving folder argument " + i + " for job " + id_job, dbe);
} Defensive patterns
Strategy: try-catch
Validate before calling
// before save
String[] args = jobEntry.getArguments();
if (args != null) {
for (String a : args) {
if (a != null && a.length() > 255) {
throw new IllegalArgumentException("Folder name too long for repository column: " + a);
}
}
} Try / catch
try {
entry.saveRep(rep, metaStore, idJob);
} catch (KettleException e) {
if (e.getCause() instanceof KettleDatabaseException) {
logError("DB write failed saving job " + idJob + ": " + e.getCause().getMessage());
}
throw e;
} Prevention
- Check DB connectivity and locks before large saves
- Keep folder names within the repository column length
- Avoid concurrent saves of the same job
- Maintain the repository schema at the correct version
When it happens
Trigger: Calling saveRep() (via JobMeta.save to a DB repository) when inserting the per-row 'name' attributes fails: DB down, table locked, schema missing, column overflow.
Common situations: Repository database outage or failover mid-save; missing repository tables after fresh install; insufficient DB grants; overly long folder names exceeding column size; concurrent saves causing lock contention.
Related errors
- JobDosToUnix.Error.Exception.UnableLoadRep
- JobDosToUnix.Error.Exception.UnableSaveRep
- JobEntryDeleteFiles.UnableToSaveToRepo
- JobEntryDeleteFolders.UnableToLoadFromRepo
- JobEntryDeleteResultFilenames.CanNotLoadFromRep
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/435e0c8590aff755.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/job/entries/deletefolders/JobEntryDeleteFolders.java:190
throw new KettleException( BaseMessages.getString( PKG, "JobEntryDeleteFolders.UnableToLoadFromRepo", String
.valueOf( id_jobentry ) ), dbe );
}
}
public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {
try {
rep.saveJobEntryAttribute( id_job, getObjectId(), "arg_from_previous", argFromPrevious );
rep.saveJobEntryAttribute( id_job, getObjectId(), "limit_folders", limit_folders );
rep.saveJobEntryAttribute( id_job, getObjectId(), "success_condition", success_condition );
// save the arguments...
if ( arguments != null ) {
for ( int i = 0; i < arguments.length; i++ ) {
rep.saveJobEntryAttribute( id_job, getObjectId(), i, "name", arguments[i] );
}
}
} catch ( KettleDatabaseException dbe ) {
throw new KettleException( BaseMessages.getString( PKG, "JobEntryDeleteFolders.UnableToSaveToRepo", String
.valueOf( id_job ) ), dbe );
}
}
public Result execute( Result result, int nr ) throws KettleException {
List<RowMetaAndData> rows = result.getRows();
result.setNrErrors( 1 );
result.setResult( false );
NrErrors = 0;
NrSuccess = 0;
successConditionBroken = false;
successConditionBrokenExit = false;
limitFolders = Const.toInt( environmentSubstitute( getLimitFolders() ), 10 );
//Set Embedded NamedCluter MetatStore Provider Key so that it can be passed to VFS
if ( parentJobMeta.getNamedClusterEmbedManager() != null ) {View on GitHub (pinned to f3058517a1)