pentaho/pentaho-kettle · error · KettleException
StringCutMeta.Exception.UnexpectedErrorInReadingStepInfo
Error message
StringCutMeta.Exception.UnexpectedErrorInReadingStepInfo
What it means
StringCutMeta throws this KettleException in readRep() when reading the step's settings from the Pentaho repository fails unexpectedly. It wraps the underlying exception from rep.getStepAttributeString() calls. The step's configuration cannot be loaded, so transformation loading aborts.
Solutions
- Inspect the wrapped cause exception for the repository error
- Verify repository connectivity and retry loading the transformation
- Check r_step_attribute rows for this id_step and repair/delete corrupt entries
- Recreate the step in Spoon and re-save it to the repository
Example fix
// before throw new KettleException(BaseMessages.getString(PKG, "StringCutMeta.Exception.UnexpectedErrorInReadingStepInfo"), e); // after // diagnose cause (e.g. repository disconnect) then: repository.connect(...); // retry readRep with a healthy connection
Defensive patterns
Strategy: try-catch
Validate before calling
// before readRep
if (!repository.isConnected()) repository.connect(user, pass);
if (idStep == null) throw new IllegalArgumentException("step id required"); Type guard
boolean isReadable(Repository rep, ObjectId idStep) {
try { return idStep != null && rep.getStepAttributes(idStep) != null; }
catch (Exception e) { return false; }
} Try / catch
try {
meta.readRep(repository, metaStore, idStep, databases);
} catch (KettleException e) {
logError("Repository read failed: " + e.getCause(), e);
meta.setDefault();
} Prevention
- Verify repository health before loading transformations
- Audit r_step_attribute rows after imports/migrations
- Retry with a fresh connection on transient repository errors
- Re-save steps in Spoon to repair inconsistent attributes
When it happens
Trigger: Calling readRep() when rep.getStepAttributeString(...) throws for attributes in_stream_name/out_stream_name/cut_from/cut_to — repository I/O error, missing step record, or corrupt attribute rows.
Common situations: Repository database connectivity problems; partially deleted step attributes; import/export that left inconsistent r_step_attribute rows.
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
- StreamLookupMeta.Exception.UnexpecteErrorReadingStepInfoFrom…
- Edi2Xml.Exception.UnexpectedErrorInReadingStepInfo
- FilterRowsMeta.Exception.UnexpectedErrorInReadingStepInfoFromRepository
- FlattenerMeta.Exception.UnexpectedErrorInReadingStepInfoFromRepository
- StringOperationsMeta.Exception.UnexpectedErrorInReadingStepI…
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/143db08ff260c913.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/stringcut/StringCutMeta.java:206
retval.append( " </fields>" ).append( Const.CR );
return retval.toString();
}
public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
try {
int nrkeys = rep.countNrStepAttributes( id_step, "in_stream_name" );
allocate( nrkeys );
for ( int i = 0; i < nrkeys; i++ ) {
fieldInStream[i] = Const.NVL( rep.getStepAttributeString( id_step, i, "in_stream_name" ), "" );
fieldOutStream[i] = Const.NVL( rep.getStepAttributeString( id_step, i, "out_stream_name" ), "" );
cutFrom[i] = Const.NVL( rep.getStepAttributeString( id_step, i, "cut_from" ), "" );
cutTo[i] = Const.NVL( rep.getStepAttributeString( id_step, i, "cut_to" ), "" );
}
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString(
PKG, "StringCutMeta.Exception.UnexpectedErrorInReadingStepInfo" ), e );
}
}
public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
try {
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] );
rep.saveStepAttribute( id_transformation, id_step, i, "cut_from", cutFrom[i] );
rep.saveStepAttribute( id_transformation, id_step, i, "cut_to", cutTo[i] );
}
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString( PKG, "StringCutMeta.Exception.UnableToSaveStepInfo" )
+ id_step, e );
}
}View on GitHub (pinned to f3058517a1)