pentaho/pentaho-kettle · error · KettleXMLException

CloneRowMeta.Exception.UnableToReadStepInfo

Error message

CloneRowMeta.Exception.UnableToReadStepInfo

What it means

CloneRowMeta.readData parses the <step> XML node for the Clone Row step's settings (nrclones, nrcloneinfield, nrclonefield, addclonenum, clonenumfield). If any XMLHandler call fails (malformed XML, missing node structure), the catch block wraps the exception in a KettleXMLException with this localized message. It signals that the step's metadata could not be deserialized from a .ktr file.

Solutions

  1. Open the .ktr in a text editor and validate the CloneRow step's XML block for malformed/missing tags
  2. Recreate the Clone Row step in Spoon and re-enter its settings
  3. Check file encoding and ensure the XML is well-formed with an XML validator
  4. Verify Pentaho/PDI version compatibility of the transformation file

Example fix

// before: hand-edited XML with unclosed tag
<nrclonefield>clones<nrclonefield>
// after
<nrclonefield>clones</nrclonefield>
Defensive patterns

Strategy: try-catch

Validate before calling

// Java: validate XML before loading
DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(ktrXml)));

Try / catch

try {
  transMeta.loadXML(file, null, false, null, null, monitor);
} catch (KettleXMLException e) {
  if (e.getMessage().contains("UnableToReadStepInfo")) {
    // inspect step XML block, restore from backup or recreate step
  }
}

Prevention

When it happens

Trigger: Loading a transformation from XML via StepMeta.loadXML when the stepnode is malformed, lacks expected child tags in an unexpected structure, or XMLHandler.getTagValue throws during parsing.

Common situations: Opening a .ktr file produced by a different Pentaho version, a hand-edited or truncated transformation file, or copying step XML between transformations with corrupted markup.

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/d9740aa1649399a7. Report an issue: GitHub.

Appendix: source

Thrown at plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/clonerow/CloneRowMeta.java:176

    return cloneflagfield;
  }

  public void setCloneFlagField( String cloneflagfield ) {
    this.cloneflagfield = cloneflagfield;
  }

  private void readData( Node stepnode ) throws KettleXMLException {
    try {
      nrclones = XMLHandler.getTagValue( stepnode, "nrclones" );
      addcloneflag = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "addcloneflag" ) );
      cloneflagfield = XMLHandler.getTagValue( stepnode, "cloneflagfield" );
      nrcloneinfield = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "nrcloneinfield" ) );
      nrclonefield = XMLHandler.getTagValue( stepnode, "nrclonefield" );
      addclonenum = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "addclonenum" ) );
      clonenumfield = XMLHandler.getTagValue( stepnode, "clonenumfield" );

    } catch ( Exception e ) {
      throw new KettleXMLException(
        BaseMessages.getString( PKG, "CloneRowMeta.Exception.UnableToReadStepInfo" ), e );
    }
  }

  public void setDefault() {
    nrclones = "0";
    cloneflagfield = null;
    nrclonefield = null;
    nrcloneinfield = false;
    addcloneflag = false;
    addclonenum = false;
    clonenumfield = null;
  }

  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases )
    throws KettleException {
    try {
      nrclones = rep.getStepAttributeString( id_step, "nrclones" );

View on GitHub (pinned to f3058517a1)