pentaho/pentaho-kettle · error · KettleException
JobEntryAddResultFilenames.UnableToSaveToRepo
Error message
JobEntryAddResultFilenames.UnableToSaveToRepo
What it means
saveRep throws KettleException with this message when saving the entry's per-row name/filemask attributes to the repository fails with a KettleDatabaseException. The job id is embedded in the message so the failing record can be located.
Solutions
- Check the wrapped KettleDatabaseException cause for the SQL error and fix the repository DB issue (space, locks, permissions).
- Confirm the DB user has INSERT/UPDATE rights on R_JOBENTRY_ATTRIBUTE.
- Retry saving the job after re-establishing the repository connection.
Example fix
// before rep.saveJobEntryAttribute( id_job, getObjectId(), i, "filemask", filemasks[i] ); // after rep.saveJobEntryAttribute( id_job, getObjectId(), i, "filemask", filemasks[i] != null ? filemasks[i] : "" );
Defensive patterns
Strategy: try-catch
Validate before calling
// pre-save sanity checks if ( arguments == null || filemasks == null || arguments.length != filemasks.length ) throw new IllegalStateException( "mismatched argument/filemask arrays" ); rep.getConnection() != null; // verify repository DB reachable
Try / catch
try { entry.saveRep( rep, metaStore, id_job ); } catch ( KettleException e ) { logError( "save failed for job " + id_job + ": " + e.getMessage(), e ); /* inspect KettleDatabaseException cause for SQL error */ } Prevention
- Ensure repository DB user has INSERT/UPDATE grants.
- Monitor repository DB disk space and locks.
- Avoid concurrent edits of the same job.
When it happens
Trigger: rep.saveJobEntryAttribute(id_job, getObjectId(), i, "name"/"filemask", ...) failing due to DB constraint violation, connection loss, read-only repository, or null arguments array element issues.
Common situations: Repository database disk full, transaction deadlocks, saving a job while the DB schema is mid-upgrade, or credentials without INSERT/UPDATE rights.
Related errors
- AbortMeta.Exception.UnableToSaveStepInfoToRepository
- ERROR_0003_Cannot_Save_Job_Entry
- Edi2Xml.Exception.UnableToSaveStepInfoToRepository
- ERROR_0002_Cannot_Load_Job_From_Repository
- ERROR_0002
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/eed4fa32a126b28b.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/core/impl/src/main/java/org/pentaho/di/job/entries/addresultfilenames/JobEntryAddResultFilenames.java:190
PKG, "JobEntryAddResultFilenames.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(), "include_subfolders", includeSubfolders );
rep.saveJobEntryAttribute( id_job, getObjectId(), "delete_all_before", deleteallbefore );
// save the arguments...
if ( arguments != null ) {
for ( int i = 0; i < arguments.length; i++ ) {
rep.saveJobEntryAttribute( id_job, getObjectId(), i, "name", arguments[i] );
rep.saveJobEntryAttribute( id_job, getObjectId(), i, "filemask", filemasks[i] );
}
}
} catch ( KettleDatabaseException dbe ) {
throw new KettleException( BaseMessages.getString(
PKG, "JobEntryAddResultFilenames.UnableToSaveToRepo", String.valueOf( id_job ) ), dbe );
}
}
public Result execute( Result result, int nr ) throws KettleException {
List<RowMetaAndData> rows = result.getRows();
RowMetaAndData resultRow = null;
int nrErrFiles = 0;
result.setResult( true );
if ( deleteallbefore ) {
// clear result filenames
int size = result.getResultFiles().size();
if ( log.isBasic() ) {
logBasic( BaseMessages.getString( PKG, "JobEntryAddResultFilenames.log.FilesFound", "" + size ) );
}
View on GitHub (pinned to f3058517a1)