pentaho/pentaho-kettle · error · KettleException
Unable to save job entry of type job to the repository with…
Error message
Unable to save job entry of type job to the repository with id_job=
What it means
JobEntryJob.saveRep() wraps any KettleDatabaseException raised while writing the job entry's attributes (directories, filename, parameter arrays, pass_all_parameters) into the repository with this message, including the id_job. It indicates the repository write failed so the job entry metadata was not persisted.
Solutions
- Read the chained KettleDatabaseException for the concrete SQL error and fix the underlying DB issue (space, locks, constraints)
- Verify the repository schema matches the PDI version and run the repository upgrade/repair tool if needed
- Shorten or remove oversized parameter values before saving
- Retry the save after confirming the repository connection is healthy
Example fix
// before
jobEntry.saveRep(rep, idJob);
// after
try {
jobEntry.saveRep(rep, idJob);
} catch (KettleException e) {
logError("Save failed: " + e.getCause(), e);
throw e; // surface so caller can re-run against a repaired repository
} Defensive patterns
Strategy: try-catch
Validate before calling
// before saveRep
if (rep == null || rep.getConnection() == null) throw new IllegalStateException("Repository not connected");
for (String v : parameterValues) {
if (v != null && v.length() > MAX_PARAM_LENGTH) throw new IllegalArgumentException("parameter_value too long");
} Try / catch
try {
entry.saveRep(rep, idJob);
} catch (KettleException e) {
Throwable cause = e.getCause();
if (cause instanceof KettleDatabaseException) {
// retry after checking constraints/locks, or surface to user for repair
}
throw e;
} Prevention
- Keep parameter values within repository column length limits
- Save from a single process to avoid concurrent-write lock conflicts
- Verify repository is not read-only before programmatic saves
- Run the repository schema repair tool after PDI upgrades
When it happens
Trigger: Calling saveRep(rep, id_job) when the repository connection drops mid-save, a parameter value violates a column constraint (too long, null), the R_JOBENTRY_ATTRIBUTE insert fails, or the DB is read-only/locked.
Common situations: Repository DB read-only or out of space; parameter_value exceeds column length; concurrent saves causing lock timeouts; schema mismatch after PDI upgrade.
Related errors
- GetSequenceMeta.Exception.UnableToReadStepInfo
- GetSequenceMeta.Exception.UnableToSaveStepInfo
- JobCopyFiles.Error.Exception.UnableLoadRep
- JobEntryCopyMoveResultFilenames.CanNotLoadFromRep
- JobMoveFiles.Error.Exception.UnableLoadRep
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/f042d98bb13f5250.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/job/entries/job/JobEntryJob.java:607
for ( int i = 0; i < arguments.length; i++ ) {
rep.saveJobEntryAttribute( id_job, getObjectId(), i, "argument", arguments[i] );
}
}
// save the parameters...
if ( parameters != null ) {
for ( int i = 0; i < parameters.length; i++ ) {
rep.saveJobEntryAttribute( id_job, getObjectId(), i, "parameter_name", parameters[i] );
rep.saveJobEntryAttribute( id_job, getObjectId(), i, "parameter_stream_name", Const.NVL(
parameterFieldNames[i], "" ) );
rep.saveJobEntryAttribute( id_job, getObjectId(), i, "parameter_value", Const.NVL(
parameterValues[i], "" ) );
}
}
rep.saveJobEntryAttribute( id_job, getObjectId(), "pass_all_parameters", passingAllParameters );
} catch ( KettleDatabaseException dbe ) {
throw new KettleException(
"Unable to save job entry of type job to the repository with id_job=" + id_job, dbe );
}
}
@Override
public Result execute( Result result, int nr ) throws KettleException {
result.setEntryNr( nr );
LogChannelFileWriter logChannelFileWriter = null;
LogLevel jobLogLevel = parentJob.getLogLevel();
//Set Embedded NamedCluter MetatStore Provider Key so that it can be passed to VFS
if ( parentJobMeta.getNamedClusterEmbedManager() != null ) {
parentJobMeta.getNamedClusterEmbedManager()
.passEmbeddedMetastoreKey( this, parentJobMeta.getEmbeddedMetastoreProviderKey() );
}
if ( setLogfile ) {View on GitHub (pinned to f3058517a1)