pentaho/pentaho-kettle · error · KettleException
GetPreviousRowFieldMeta.Exception.UnableToSaveStepInfo
Error message
GetPreviousRowFieldMeta.Exception.UnableToSaveStepInfo
What it means
GetPreviousRowFieldMeta.saveRep() writes each field's in_stream_name/out_stream_name as numbered step attributes. Any exception from the repository during these writes is wrapped in a KettleException with this localized message plus the id_step, with the original exception as cause.
Solutions
- Verify the repository database is up and the connection is valid
- Inspect the cause (SQL exception) and fix schema/permissions issues
- Reconnect to the repository and retry the save
- Check the repository user's write privileges on step attribute tables
Example fix
// before
stepMeta.saveRep(rep, metaStore, id_transformation, id_step);
// after
try {
stepMeta.saveRep(rep, metaStore, id_transformation, id_step);
} catch (KettleException e) {
logError("Save failed for id_step " + id_step + ": " + e.getCause());
throw e;
} Defensive patterns
Strategy: try-catch
Validate before calling
if (rep == null || !rep.isConnected()) { throw new IllegalStateException("Repository not connected before saveRep"); } Try / catch
try { meta.saveRep(rep, metaStore, id_transformation, id_step); } catch (KettleException e) { log.error("saveRep failed for id_step " + id_step + ": " + e.getCause(), e); /* reconnect and retry once */ } Prevention
- Check DB health before large save operations
- Avoid long-idle repository sessions that get dropped
- Grant write privileges on step attribute tables
- Wrap saves in retry-once logic after reconnect
When it happens
Trigger: Saving a transformation to the repository when a saveStepAttribute call fails — repository DB unreachable, constraint violation, or insufficient permissions.
Common situations: Repository database offline or read-only; session/transaction invalidated after long idle; schema missing the Kettle step attribute tables; quota or permission limits on the repository user.
Related errors
- AbortMeta.Exception.UnableToSaveStepInfoToRepository
- Edi2Xml.Exception.UnableToSaveStepInfoToRepository
- ERROR_0002_Cannot_Load_Job_From_Repository
- ERROR_0002
- ERROR_0003_Cannot_Save_Job_Entry
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/a58182059e215944.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/get-previous-row-field/core/src/main/java/org/pentaho/di/trans/steps/getpreviousrowfield/GetPreviousRowFieldMeta.java:211
fieldOutStream[i] = Const.NVL( rep.getStepAttributeString( id_step, i, "out_stream_name" ), "" );
}
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString(
PKG, "GetPreviousRowFieldMeta.Exception.UnexpectedErrorInReadingStepInfo" ), e );
}
}
@Override
public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
try {
rep.saveStepAttribute( id_transformation, id_step, "schema", schema );
for ( int i = 0; i < fieldInStream.length; i++ ) {
rep.saveStepAttribute( id_transformation, id_step, i, "in_stream_name", fieldInStream[i] );
rep.saveStepAttribute( id_transformation, id_step, i, "out_stream_name", fieldOutStream[i] );
}
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString(
PKG, "GetPreviousRowFieldMeta.Exception.UnableToSaveStepInfo" )
+ id_step, e );
}
}
@Override
public void getFields( Bowl bowl, RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info,
StepMeta nextStep, VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {
// Add new field?
for ( int i = 0; i < fieldOutStream.length; i++ ) {
if ( !Utils.isEmpty( fieldOutStream[i] ) ) {
int index = inputRowMeta.indexOfValue( fieldInStream[i] );
if ( index >= 0 ) {
ValueMetaInterface in = inputRowMeta.getValueMeta( index );
try {
ValueMetaInterface v =
ValueMetaFactory.createValueMeta( space.environmentSubstitute( fieldOutStream[i] ), in.getType() );View on GitHub (pinned to f3058517a1)