pentaho/pentaho-kettle · error · KettleXMLException
Unable to load step info from XML
Error message
Unable to load step info from XML
What it means
DataGridMeta.readData parses the step's XML definition (field and data line nodes) into step metadata. Any exception thrown while walking the XML tree is wrapped in this KettleXMLException so the transformation fails to load with a clear message and the underlying cause attached.
Solutions
- Open the .ktr in a text editor and validate the <fields> and <data> sections of the Data Grid step against a working example.
- Reload the step by deleting and re-adding the Data Grid step in Spoon so defaults are regenerated.
- Check that the engine version matches the file version; upgrade the engine or re-save the transformation with the current Spoon.
- Inspect the chained cause ('Caused by') of the KettleXMLException for the real parsing failure.
Example fix
// before: hand-edited XML missing <fields> node <step><name>Grid</name><type>DataGrid</type><data>...</data></step> // after: complete structure <step><name>Grid</name><type>DataGrid</type><fields>...</fields><data>...</data></step>
Defensive patterns
Strategy: try-catch
Validate before calling
// validate the Data Grid step XML before load
Node stepnode = ...;
if (XMLHandler.getNodeValue(XMLHandler.getSubNode(stepnode,"fields")) == null && XMLHandler.getSubNode(stepnode,"fields") == null)
throw new IllegalArgumentException("DataGrid step is missing <fields> section"); Type guard
boolean hasFields(Node n){ return XMLHandler.getSubNode(n,"fields") != null; } Try / catch
try { meta.loadXML(stepnode, databases, metaStore); }
catch (KettleXMLException e) {
logError("DataGrid step XML invalid: " + e.getCause(), e);
// fall back to defaults or abort the load
} Prevention
- Never hand-edit .ktr XML; edit steps in Spoon.
- Keep the Pentaho engine version aligned with the file version.
- Validate .ktr files against the schema/version before loading.
- Always inspect the chained cause of KettleXMLException.
When it happens
Trigger: loadXML is called with a malformed or unexpected <step> node: missing <fields>/<data> elements, wrong child node types, or XMLHandler.getTagValue returning values that break parsing (e.g. null where an attribute list is expected).
Common situations: Hand-edited or truncated .ktr files; transformations produced by a newer Pentaho version with extra/renamed XML elements being read by an older engine; XML copied between transformations with missing sections.
Understand the failure class
Background: JSON parse error: "Unexpected token" / "not valid JSON" / "failed to parse" — what JSON parsers are really complaining about — this error's family across 45 libraries.
Related errors
- DBProcMeta.Exception.UnableToReadStepInfo
- MergeJoinMeta.Exception.UnableToLoadStepInfo
- MergeRowsMeta.Exception.UnableToLoadStepInfo
- PGPEncryptStreamMeta.Exception.UnableToReadStepInfo
- StepWithMappingMeta.Exception.UnableToLoadTrans
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/702f2aab9fbb7b92.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/datagrid/DataGridMeta.java:328
if ( "line".equals( lineNode.getNodeName() ) ) {
List<String> line = new ArrayList<>();
Node itemNode = lineNode.getFirstChild();
while ( itemNode != null ) {
if ( "item".equals( itemNode.getNodeName() ) ) {
String itemNodeValue = XMLHandler.getNodeValue( itemNode );
line.add( itemNodeValue );
}
itemNode = itemNode.getNextSibling();
}
dataLines.add( line );
}
lineNode = lineNode.getNextSibling();
}
} catch ( Exception e ) {
throw new KettleXMLException( "Unable to load step info from XML", e );
}
}
@Override
public void setDefault() {
int i;
int nrfields = 0;
allocate( nrfields );
DecimalFormat decimalFormat = new DecimalFormat();
for ( i = 0; i < nrfields; i++ ) {
fieldName[i] = FIELD + i;
fieldType[i] = "Number";
fieldFormat[i] = "\u00A40,000,000.00;\u00A4-0,000,000.00";
fieldLength[i] = 9;
fieldPrecision[i] = 2;View on GitHub (pinned to f3058517a1)