pentaho/pentaho-kettle · error · KettleXMLException

Template Plugin Unable to read step info from XML node

Error message

Template Plugin Unable to read step info from XML node

What it means

Edi2XmlMeta.loadXML reads the 'inputfield' and 'outputfield' child nodes of the step's XML definition. Any exception during parsing is wrapped in a KettleXMLException with this message. It indicates the EDI 2 XML step metadata could not be restored from the .ktr XML.

Solutions

  1. Open the .ktr in a text editor and confirm <inputfield> and <outputfield> nodes exist inside the step node
  2. Re-add the Edi2Xml step in Spoon and re-save the transformation
  3. Check the plugin version that wrote the file matches the reading version
  4. Read the wrapped cause 'e' to pinpoint the parse failure

Example fix

// before
// <step><name>EDI</name></step> (missing fields)
// after
// <step><name>EDI</name><inputfield>line</inputfield><outputfield>xml</outputfield></step>
Defensive patterns

Strategy: validation

Validate before calling

// confirm the step node has required children before loadXML
if (XMLHandler.getSubNode(stepnode, "inputfield") == null || XMLHandler.getSubNode(stepnode, "outputfield") == null) {
  throw new IllegalArgumentException("Edi2Xml step node missing inputfield/outputfield");
}

Try / catch

try { meta.loadXML(stepnode, databases, metaStore); } catch (KettleXMLException e) { logger.error("Cannot restore Edi2Xml step from XML", e); throw e; }

Prevention

When it happens

Trigger: Calling loadXML on a stepnode missing the 'inputfield'/'outputfield' subnodes or with malformed XML, so getNodeValue/getSubNode throws.

Common situations: Transformation files edited by hand or by older plugin versions; XMLHandler.getSubNode returning an unexpected node; corrupted .ktr files.

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


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

Appendix: source

Thrown at plugins/edi2xml/impl/src/main/java/org/pentaho/di/trans/steps/edi2xml/Edi2XmlMeta.java:96

  @Override
  public String getXML() throws KettleValueException {
    StringBuilder retval = new StringBuilder();

    retval.append( "   " + XMLHandler.addTagValue( "inputfield", inputField ) );
    retval.append( "   " + XMLHandler.addTagValue( "outputfield", outputField ) );

    return retval.toString();
  }

  @Override
  public void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ) throws KettleXMLException {

    try {
      setInputField( XMLHandler.getNodeValue( XMLHandler.getSubNode( stepnode, "inputfield" ) ) );
      setOutputField( XMLHandler.getNodeValue( XMLHandler.getSubNode( stepnode, "outputfield" ) ) );
    } catch ( Exception e ) {
      throw new KettleXMLException( "Template Plugin Unable to read step info from XML node", e );
    }

  }

  @Override
  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
    try {
      inputField = rep.getStepAttributeString( id_step, "inputfield" );
      outputField = rep.getStepAttributeString( id_step, "outputfield" );
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages
        .getString( PKG, "Edi2Xml.Exception.UnexpectedErrorInReadingStepInfo" ), e );
    }
  }

  @Override
  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    try {

View on GitHub (pinned to f3058517a1)