pentaho/pentaho-kettle · error · KettleException
Unexpected error reading step information from the…
Error message
Unexpected error reading step information from the repository
What it means
RandomValueMeta.readRep wraps exceptions raised while loading the Random Value step's fields from the repository into a generic KettleException. It indicates the step metadata (field_name / field_type attributes per field index) could not be read from r_step_attribute.
Solutions
- Check the chained cause for the underlying repository error
- Reconnect to the repository and retry loading
- Verify nrfields attribute and the indexed field_name/field_type rows exist and are intact
- Re-save the step in Spoon to rewrite its attributes
Example fix
// before
meta.readRep(repository, metastore, stepId, databases);
// after
try {
meta.readRep(repository, metastore, stepId, databases);
} catch (KettleException e) {
logError("Failed reading RandomValue step: " + (e.getCause() != null ? e.getCause().getMessage() : ""));
throw new KettleException("Repository unreadable — reconnect and retry", e);
} Defensive patterns
Strategy: try-catch
Validate before calling
if (rep == null || idStep == null) throw new KettleException("Repository and id_step are required for readRep"); Try / catch
try { meta.readRep(rep, metaStore, idStep, databases); } catch (KettleException e) { logError("RandomValue repository read failed: " + e.getCause()); throw e; } Prevention
- Read the chained cause for the underlying repository error
- Audit r_step_attribute rows after interrupted saves
- Reconnect and retry on transient DB failures
- Re-save steps after repository schema upgrades
When it happens
Trigger: readRep() invoked when Repository.getStepAttributeString throws for the per-field loop (bad id_step, repository connection lost, corrupted attribute rows) or nrfields resolves to a bad value.
Common situations: Corrupted r_step_attribute rows after a failed save; DB repository connection dropped mid-load; opening a transformation stored under an older repository schema.
Understand the failure class
Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.
Related errors
- GetTableNamesMeta.Exception.UnexpectedErrorReadingStepInfo
- Unexpected error reading step information from the…
- Unexpected error reading step information from the…
- DatabaseJoinMeta.Exception.UnexpectedErrorReadingStepInfo
- ElasticSearchBulkMeta.Exception.ErrorReadingRepository
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/22c3e1b06187a786.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/randomvalue/RandomValueMeta.java:272
}
retval.append( " </fields>" + Const.CR );
return retval.toString();
}
@Override
public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
try {
int nrfields = rep.countNrStepAttributes( id_step, "field_name" );
allocate( nrfields );
for ( int i = 0; i < nrfields; i++ ) {
fieldName[i] = rep.getStepAttributeString( id_step, i, "field_name" );
fieldType[i] = getType( rep.getStepAttributeString( id_step, i, "field_type" ) );
}
} catch ( Exception e ) {
throw new KettleException( "Unexpected error reading step information from the repository", e );
}
}
@Override
public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
try {
for ( int i = 0; i < fieldName.length; i++ ) {
rep.saveStepAttribute( id_transformation, id_step, i, "field_name", fieldName[i] );
rep.saveStepAttribute( id_transformation, id_step, i, "field_type", functions[fieldType[i]] != null
? functions[fieldType[i]].getCode() : "" );
}
} catch ( Exception e ) {
throw new KettleException( "Unable to save step information to the repository for id_step=" + id_step, e );
}
}
@OverrideView on GitHub (pinned to f3058517a1)