pentaho/pentaho-kettle · error · KettleXMLException
Unable to load step info from XML
Error message
Unable to load step info from XML
What it means
ExcelWriterStepMeta.loadXML wraps any exception raised while parsing the step's XML node in a KettleXMLException with this generic message. It means the <step> XML fragment for the Excel Writer step is malformed or missing expected fields.
Solutions
- Open the .ktr in a text editor and validate the ExcelWriterStep XML block against a known-good transformation
- Recreate the step in Spoon to regenerate correct XML
- Check PDI version compatibility; export the transformation from the version that created it
Defensive patterns
Strategy: try-catch
Validate before calling
// validate XML well-formedness before load DocumentBuilderFactory.newInstance().newDocumentBuilder().parse( new File( ktrPath ) );
Try / catch
try { transMeta.loadXml( file ); } catch ( KettleXMLException e ) { log.error( "Corrupt step XML: " + e.getCause(), e ); } Prevention
- Don't hand-edit .ktr files; edit in Spoon
- Store transformations in version control as whole files, not merged fragments
- Keep PDI versions consistent across teams
When it happens
Trigger: Loading a .ktr file whose ExcelWriterStep node is corrupt, hand-edited, or produced by an incompatible Pentaho version (missing/renamed tags like 'formula', 'hyperlinkField').
Common situations: Opening transformations from older/newer PDI versions; merging KTR files in version control; corrupted XML from partial writes.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- SETVARIABLE0004
- XBaseInputMeta.Exception.UnableToReadStepInformationFromXML
- CloneRowMeta.Exception.UnableToReadStepInfo
- ColumnExistsMeta.Exception.UnableToReadStepInfo
- CreditCardValidatorMeta.Exception.UnableToReadStepInfo
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/5f6e7786e72016c3.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/excel/core/src/main/java/org/pentaho/di/trans/steps/excelwriter/ExcelWriterStepMeta.java:768
for ( int i = 0; i < nrfields; i++ ) {
Node fnode = XMLHandler.getSubNodeByNr( fields, "field", i );
outputFields[i] = new ExcelWriterStepField();
outputFields[i].setName( XMLHandler.getTagValue( fnode, "name" ) );
outputFields[i].setType( XMLHandler.getTagValue( fnode, "type" ) );
outputFields[i].setFormat( XMLHandler.getTagValue( fnode, "format" ) );
outputFields[i].setTitle( XMLHandler.getTagValue( fnode, "title" ) );
outputFields[i].setTitleStyleCell( XMLHandler.getTagValue( fnode, "titleStyleCell" ) );
outputFields[i].setStyleCell( XMLHandler.getTagValue( fnode, "styleCell" ) );
outputFields[i].setCommentField( XMLHandler.getTagValue( fnode, "commentField" ) );
outputFields[i].setCommentAuthorField( XMLHandler.getTagValue( fnode, "commentAuthorField" ) );
outputFields[i].setFormula( XMLHandler.getTagValue( fnode, "formula" ) != null
&& XMLHandler.getTagValue( fnode, "formula" ).equalsIgnoreCase( "Y" ) );
outputFields[i].setHyperlinkField( XMLHandler.getTagValue( fnode, "hyperlinkField" ) );
}
} catch ( Exception e ) {
throw new KettleXMLException( "Unable to load step info from XML", e );
}
}
private boolean getBooleanValue( Node node, String tag, boolean defaultValue ) {
String value = XMLHandler.getTagValue( node, tag );
return Optional.ofNullable( value ).filter( StringUtils::isNotBlank ).map( val -> "Y".equals( val ) ).orElse( defaultValue );
}
public String getNewLine( String fformat ) {
String nl = System.getProperty( "line.separator" );
if ( fformat != null ) {
if ( fformat.equalsIgnoreCase( "DOS" ) ) {
nl = "\r\n";
} else if ( fformat.equalsIgnoreCase( "UNIX" ) ) {
nl = "\n";
}
}View on GitHub (pinned to f3058517a1)