pentaho/pentaho-kettle · error · KettleXMLException
ReplaceStringMeta.Exception.UnableToReadStepInfoFromXML
Error message
ReplaceStringMeta.Exception.UnableToReadStepInfoFromXML
What it means
ReplaceStringMeta.loadXML calls readData to parse the step's <fields> per-field XML nodes (in_stream_name, out_stream_name, replace_string, flags, etc.); any exception is wrapped in KettleXMLException 'ReplaceStringMeta.Exception.UnableToReadStepInfoFromXML'. The step configuration in the .ktr could not be deserialized.
Solutions
- Inspect the ReplaceString step's <fields> XML in the .ktr for missing/malformed child tags.
- Fix invalid flag values (use Y/N/true/false/yes/no).
- Recreate the step in Spoon and reconfigure the mappings.
- Open the file with the same or newer Pentaho version that saved it.
Example fix
<!-- before: malformed field node --> <field><in_stream_name>foo</field> <!-- after --> <field><in_stream_name>foo</in_stream_name><out_stream_name>foo_out</out_stream_name></field>
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Loading a .ktr whose ReplaceString <fields> entries are malformed/missing tags, or where a flag string cannot be processed by getFlagFromString paths in readData.
Common situations: Hand-edited transformations; files saved by newer Pentaho versions opened in older ones; corrupted or truncated .ktr files.
Related errors
- GetTableNamesMeta.Exception.UnableToReadStepInfo
- GPBulkLoaderMeta.Exception.UnableToReadStepInfoFromXML
- GPLoadMeta.Exception.UnableToReadStepInfoFromXML
- JobEntryMailValidator.Meta.UnableToLoadFromXML
- LDAPInputMeta.UnableToLoadFromXML
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/133f2dc4bf6348ab.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/replacestring/ReplaceStringMeta.java:260
fieldInStream[i] = Const.NVL( XMLHandler.getTagValue( fnode, "in_stream_name" ), "" );
fieldOutStream[i] = Const.NVL( XMLHandler.getTagValue( fnode, "out_stream_name" ), "" );
useRegEx[i] = getFlagFromString( Const.NVL( XMLHandler.getTagValue( fnode, "use_regex" ), "" ) );
replaceString[i] = Const.NVL( XMLHandler.getTagValue( fnode, "replace_string" ), "" );
replaceByString[i] = Const.NVL( XMLHandler.getTagValue( fnode, "replace_by_string" ), "" );
String emptyString = XMLHandler.getTagValue( fnode, "set_empty_string" );
setEmptyString[i] = !Utils.isEmpty( emptyString ) && "Y".equalsIgnoreCase( emptyString );
replaceFieldByString[i] = Const.NVL( XMLHandler.getTagValue( fnode, "replace_field_by_string" ), "" );
wholeWord[i] = getFlagFromString( Const.NVL( XMLHandler.getTagValue( fnode, "whole_word" ), "" ) );
caseSensitive[i] =
getFlagFromString( Const.NVL( XMLHandler.getTagValue( fnode, "case_sensitive" ), "" ) );
isUnicode[i] =
getFlagFromString( Const.NVL( XMLHandler.getTagValue( fnode, "is_unicode" ), "" ) );
}
} catch ( Exception e ) {
throw new KettleXMLException( BaseMessages.getString(
PKG, "ReplaceStringMeta.Exception.UnableToReadStepInfoFromXML" ), e );
}
}
private static boolean getFlagFromString( String tt ) {
return ( "Y".equalsIgnoreCase( tt ) || "yes".equalsIgnoreCase( tt ) || "true".equalsIgnoreCase( tt ) );
}
public void setDefault() {
fieldInStream = null;
fieldOutStream = null;
int nrkeys = 0;
allocate( nrkeys );
}
public String getXML() {
StringBuilder retval = new StringBuilder( 500 );View on GitHub (pinned to f3058517a1)