pentaho/pentaho-kettle · error · KettleXMLException

SplitFieldToRowsMeta.Exception.UnableToLoadStepInfoFromXML

SplitFieldToRowsMeta.Exception.UnableToLoadStepInfoFromXML

Error message

SplitFieldToRowsMeta.Exception.UnableToLoadStepInfoFromXML

What it means

Thrown by SplitFieldToRowsMeta.readData (invoked via loadXML) when parsing the step's XML definition fails. loadXML reads tags like newfield, rownum, rownum_field and delimiter_is_regex from the step node; any exception (malformed XML, unexpected node shape) is wrapped in a KettleXMLException with this message key. It means the step could not be loaded from a .ktr file.

Solutions

  1. Inspect the wrapped cause 'e' to find the exact XML parsing failure
  2. Re-open and validate the .ktr in Spoon; re-create the SplitFieldToRows step if its XML is corrupt
  3. Restore the .ktr from version control or backup
  4. Re-export/re-save the transformation from the PDI version it was created in

Example fix

// before
TransMeta tm = new TransMeta("broken.ktr"); // throws KettleXMLException
// after
try {
  TransMeta tm = new TransMeta("broken.ktr");
} catch (KettleXMLException e) {
  logError("Failed to load step XML: " + e.getCause());
  // restore from backup or rebuild the step
}
Defensive patterns

Strategy: try-catch

Validate before calling

// before loading
Document doc = XMLHandler.loadXMLFile(new File(ktrPath));
if (doc == null) throw new IllegalStateException("ktr XML not parseable");

Try / catch

try { transMeta = new TransMeta(ktrPath); } catch (KettleXMLException e) { logError("XML load failed: " + e.getCause()); /* restore backup or rebuild step */ }

Prevention

When it happens

Trigger: Loading a transformation XML where the SplitFieldToRows step node is malformed or hand-edited: missing stepnode children, XMLHandler.getTagValue throwing on invalid structure, or corruption introduced by manual XML editing or incomplete export.

Common situations: Hand-editing a .ktr file and breaking the step XML; opening transformations created in a newer PDI version with extra/renamed XML tags; truncated or partially copied .ktr files; VCS merge conflicts inside the XML.

Understand the failure class

Background: "failed to unmarshal" / json.Unmarshal errors: why parsing a response into a Go struct fails and how to fix it — this error's family across 23 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/3f1b34f8624a676e. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/splitfieldtorows/SplitFieldToRowsMeta.java:137

  public void setSplitField( String splitField ) {
    this.splitField = splitField;
  }

  public void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ) throws KettleXMLException {
    readData( stepnode );
  }

  private void readData( Node stepnode ) throws KettleXMLException {
    try {
      splitField = XMLHandler.getTagValue( stepnode, "splitfield" );
      delimiter = XMLHandler.getTagValue( stepnode, "delimiter" );
      newFieldname = XMLHandler.getTagValue( stepnode, "newfield" );
      includeRowNumber = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "rownum" ) );
      resetRowNumber = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "resetrownumber" ) );
      rowNumberField = XMLHandler.getTagValue( stepnode, "rownum_field" );
      isDelimiterRegex = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "delimiter_is_regex" ) );
    } catch ( Exception e ) {
      throw new KettleXMLException( BaseMessages.getString(
        PKG, "SplitFieldToRowsMeta.Exception.UnableToLoadStepInfoFromXML" ), e );
    }
  }

  public void setDefault() {
    splitField = "";
    delimiter = ";";
    newFieldname = "";
    includeRowNumber = false;
    isDelimiterRegex = false;
    rowNumberField = "";
    resetRowNumber = true;
  }

  @Override
  public void getFields( Bowl bowl, RowMetaInterface row, String name, RowMetaInterface[] info, StepMeta nextStep,
    VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {

View on GitHub (pinned to f3058517a1)