pentaho/pentaho-kettle · error · KettleXMLException

FieldSplitterMeta.Exception.UnableToLoadStepInfoFromXML

Error message

FieldSplitterMeta.Exception.UnableToLoadStepInfoFromXML

What it means

FieldSplitterMeta.readData parses the step's XML node (loadXML path), reading the split field, delimiters, and per-field definitions. Any parse/lookup failure inside the loop is wrapped in this KettleXMLException.

Solutions

  1. Inspect the wrapped cause to find which attribute failed to parse
  2. Validate the .ktr XML against a known-good transformation
  3. Recreate the FieldSplitter step in Spoon and re-save to regenerate clean XML
  4. Open with the PDI version matching the file's creator
Defensive patterns

Strategy: try-catch

Validate before calling

// sanity-check the XML before load
Document doc = Xml.loadFile(ktrFile);
if (doc.selectNodes("//step[@type='FieldSplitter']").isEmpty()) { /* no such step; skip */ }

Try / catch

try { meta.loadXML(stepnode, databases, metaStore); }
catch (KettleXMLException e) {
  log.error("FieldSplitter XML corrupt: {}", e.getCause(), e);
  meta.setDefault(); // rebuild defaults instead of failing the whole load
}

Prevention

When it happens

Trigger: Loading a .ktr where the <fields> section is malformed or contains attribute values that fail conversion, e.g. stype/slen/sprc failing ValueMetaFactory.getIdForValueMeta or Const.toInt.

Common situations: Hand-edited transformation XML with invalid <field> entries; XML produced by a newer PDI version missing expected attributes; truncated/corrupt file after failed transfer.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/fieldsplitter/FieldSplitterMeta.java:380

        final String stype = XMLHandler.getTagValue( fnode, "type" );
        fieldFormat[i] = XMLHandler.getTagValue( fnode, "format" );
        fieldGroup[i] = XMLHandler.getTagValue( fnode, "group" );
        fieldDecimal[i] = XMLHandler.getTagValue( fnode, "decimal" );
        fieldCurrency[i] = XMLHandler.getTagValue( fnode, "currency" );
        final String slen = XMLHandler.getTagValue( fnode, "length" );
        final String sprc = XMLHandler.getTagValue( fnode, "precision" );
        fieldNullIf[i] = XMLHandler.getTagValue( fnode, "nullif" );
        fieldIfNull[i] = XMLHandler.getTagValue( fnode, "ifnull" );
        final String trim = XMLHandler.getTagValue( fnode, "trimtype" );

        fieldRemoveID[i] = "Y".equalsIgnoreCase( sidrem );
        fieldType[i] = ValueMetaFactory.getIdForValueMeta( stype );
        fieldLength[i] = Const.toInt( slen, -1 );
        fieldPrecision[i] = Const.toInt( sprc, -1 );
        fieldTrimType[i] = ValueMetaString.getTrimTypeByCode( trim );
      }
    } catch ( Exception e ) {
      throw new KettleXMLException( BaseMessages.getString(
        PKG, "FieldSplitterMeta.Exception.UnableToLoadStepInfoFromXML" ), e );
    }
  }

  public void setDefault() {
    splitField = "";
    delimiter = ",";
    enclosure = null;
    allocate( 0 );
  }

  public int getFieldsCount() {
    int count = Math.min( getFieldName().length, getFieldType().length );
    count = Math.min( count, getFieldLength().length );
    count = Math.min( count, getFieldPrecision().length );
    count = Math.min( count, getFieldFormat().length );
    count = Math.min( count, getFieldDecimal().length );
    count = Math.min( count, getFieldGroup().length );

View on GitHub (pinned to f3058517a1)