pentaho/pentaho-kettle · error · KettleException
StringOperationsMeta.Exception.UnexpectedErrorInReadingStepI…
Error message
StringOperationsMeta.Exception.UnexpectedErrorInReadingStepInfo
What it means
KettleException thrown by StringOperationsMeta.readRep when an unexpected exception occurs while reading the String Operations step's configuration from a Pentaho repository. readRep loads per-field settings (trim, mask, digits, remove_special_characters, etc.) via rep.getStepAttributeString; any repository/IO failure inside the try block is wrapped with this localized message and rethrown. It is a generic wrapper, so the root cause is always the chained exception.
Solutions
- Inspect the chained cause exception (getCause()) for the actual repository error and fix that first.
- Verify repository connectivity: re-login, test the repository connection, and retry loading the transformation.
- Re-save the transformation from Spoon so the step attributes are rewritten, or delete and re-add the String Operations step.
- Check Kettle version compatibility between the client and the repository metadata (upgrade/migrate if versions differ).
Example fix
// before: generic wrapper hides root cause
catch ( Exception e ) {
throw new KettleException( BaseMessages.getString( PKG, "StringOperationsMeta.Exception.UnexpectedErrorInReadingStepInfo" ), e );
}
// after (caller side): log the real cause
catch ( KettleException e ) {
logError( "Failed loading StringOperations step: " + e.getCause(), e );
throw e;
} Defensive patterns
Strategy: try-catch
Validate before calling
// before load: verify repository is reachable if ( repository == null || !repository.isConnected() ) throw new IllegalStateException( "Repository not connected" );
Try / catch
try { stepMeta.readRep( rep, metaStore, idStep, databases ); } catch ( KettleException e ) { log.error( "readRep failed: " + e.getCause(), e ); throw e; } Prevention
- Keep repository sessions alive; reconnect before long metadata operations.
- Avoid hand-editing repository attribute tables.
- Pin matching PDI client/server versions.
- Test repository connectivity in CI before loading transformations.
When it happens
Trigger: Calling readRep (e.g., during transformation load from a repository) when the repository connection drops, the step attributes are corrupt/missing, or the repository API throws on getStepAttributeString for attributes like mask_xml, digits, or remove_special_characters.
Common situations: Network interruption or stale session while loading a transformation from an enterprise repository; a transformation saved by a different Kettle version with incompatible attribute layout; corrupt r_step_attribute rows in the repository database.
Understand the failure class
Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.
Related errors
- FilterRowsMeta.Exception.UnexpectedErrorInReadingStepInfoFromRepository
- FlattenerMeta.Exception.UnexpectedErrorInReadingStepInfoFromRepository
- SwitchCaseMeta.Exception.UnexpectedErrorInReadingStepInfoFromRepository
- Unexpected error reading step information from the…
- AppendMeta.Exception.UnexpectedErrorReadingStepInfo
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/95bf669b68a41f47.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/stringoperations/StringOperationsMeta.java:492
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" ), "" );
trimType[i] = Const.NVL( rep.getStepAttributeString( id_step, i, "trim_type" ), "" );
lowerUpper[i] = Const.NVL( rep.getStepAttributeString( id_step, i, "lower_upper" ), "" );
padding_type[i] = Const.NVL( rep.getStepAttributeString( id_step, i, "padding_type" ), "" );
padChar[i] = Const.NVL( rep.getStepAttributeString( id_step, i, "pad_char" ), "" );
padLen[i] = Const.NVL( rep.getStepAttributeString( id_step, i, "pad_len" ), "" );
initCap[i] = Const.NVL( rep.getStepAttributeString( id_step, i, "init_cap" ), "" );
maskXML[i] = Const.NVL( rep.getStepAttributeString( id_step, i, "mask_xml" ), "" );
digits[i] = Const.NVL( rep.getStepAttributeString( id_step, i, "digits" ), "" );
remove_special_characters[i] = Const.NVL( rep.getStepAttributeString( id_step, i, "remove_special_characters" ), "" );
}
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString(
PKG, "StringOperationsMeta.Exception.UnexpectedErrorInReadingStepInfo" ), e );
}
}
@Override
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, "trim_type", trimType[i] );
rep.saveStepAttribute( id_transformation, id_step, i, "lower_upper", lowerUpper[i] );
rep.saveStepAttribute( id_transformation, id_step, i, "padding_type", padding_type[i] );
rep.saveStepAttribute( id_transformation, id_step, i, "pad_char", padChar[i] );
rep.saveStepAttribute( id_transformation, id_step, i, "pad_len", padLen[i] );
rep.saveStepAttribute( id_transformation, id_step, i, "init_cap", initCap[i] );
rep.saveStepAttribute( id_transformation, id_step, i, "mask_xml", maskXML[i] );View on GitHub (pinned to f3058517a1)