{"record":{"id":"d9740aa1649399a7","repo":"pentaho/pentaho-kettle","slug":"clonerowmeta-exception-unabletoreadstepinfo","errorCode":null,"errorMessage":"CloneRowMeta.Exception.UnableToReadStepInfo","messagePattern":"CloneRowMeta\\.Exception\\.UnableToReadStepInfo","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/clonerow/CloneRowMeta.java","lineNumber":176,"sourceCode":"    return cloneflagfield;\n  }\n\n  public void setCloneFlagField( String cloneflagfield ) {\n    this.cloneflagfield = cloneflagfield;\n  }\n\n  private void readData( Node stepnode ) throws KettleXMLException {\n    try {\n      nrclones = XMLHandler.getTagValue( stepnode, \"nrclones\" );\n      addcloneflag = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"addcloneflag\" ) );\n      cloneflagfield = XMLHandler.getTagValue( stepnode, \"cloneflagfield\" );\n      nrcloneinfield = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"nrcloneinfield\" ) );\n      nrclonefield = XMLHandler.getTagValue( stepnode, \"nrclonefield\" );\n      addclonenum = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"addclonenum\" ) );\n      clonenumfield = XMLHandler.getTagValue( stepnode, \"clonenumfield\" );\n\n    } catch ( Exception e ) {\n      throw new KettleXMLException(\n        BaseMessages.getString( PKG, \"CloneRowMeta.Exception.UnableToReadStepInfo\" ), e );\n    }\n  }\n\n  public void setDefault() {\n    nrclones = \"0\";\n    cloneflagfield = null;\n    nrclonefield = null;\n    nrcloneinfield = false;\n    addcloneflag = false;\n    addclonenum = false;\n    clonenumfield = null;\n  }\n\n  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases )\n    throws KettleException {\n    try {\n      nrclones = rep.getStepAttributeString( id_step, \"nrclones\" );","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/clonerow/CloneRowMeta.java#L158-L194","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Open the .ktr in a text editor and validate the CloneRow step's XML block for malformed/missing tags","Recreate the Clone Row step in Spoon and re-enter its settings","Check file encoding and ensure the XML is well-formed with an XML validator","Verify Pentaho/PDI version compatibility of the transformation file"],"exampleFix":"// before: hand-edited XML with unclosed tag\n<nrclonefield>clones<nrclonefield>\n// after\n<nrclonefield>clones</nrclonefield>","handlingStrategy":"try-catch","validationCode":"// Java: validate XML before loading\nDocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(ktrXml)));","typeGuard":null,"tryCatchPattern":"try {\n  transMeta.loadXML(file, null, false, null, null, monitor);\n} catch (KettleXMLException e) {\n  if (e.getMessage().contains(\"UnableToReadStepInfo\")) {\n    // inspect step XML block, restore from backup or recreate step\n  }\n}","preventionTips":["Keep .ktr files under version control","Validate XML after any manual edit","Avoid hand-editing transformation XML"],"tags":["xml","deserialization","pdi"],"backgroundTag":"json-unmarshal-failed","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}