{"record":{"id":"3600e89b966dae57","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-step-info-from-xml-ldifinputmeta","errorCode":null,"errorMessage":"Unable to load step info from XML","messagePattern":"Unable to load step info from XML","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/ldifinput/LDIFInputMeta.java","lineNumber":742,"sourceCode":"\n      for ( int i = 0; i < nrFields; i++ ) {\n        Node fnode = XMLHandler.getSubNodeByNr( fields, \"field\", i );\n        LDIFInputField field = new LDIFInputField( fnode );\n        inputFields[i] = field;\n      }\n\n      // Is there a limit on the number of rows we process?\n      rowLimit = Const.toLong( XMLHandler.getTagValue( stepnode, \"limit\" ), 0L );\n      shortFileFieldName = XMLHandler.getTagValue( stepnode, \"shortFileFieldName\" );\n      pathFieldName = XMLHandler.getTagValue( stepnode, \"pathFieldName\" );\n      hiddenFieldName = XMLHandler.getTagValue( stepnode, \"hiddenFieldName\" );\n      lastModificationTimeFieldName = XMLHandler.getTagValue( stepnode, \"lastModificationTimeFieldName\" );\n      uriNameFieldName = XMLHandler.getTagValue( stepnode, \"uriNameFieldName\" );\n      rootUriNameFieldName = XMLHandler.getTagValue( stepnode, \"rootUriNameFieldName\" );\n      extensionFieldName = XMLHandler.getTagValue( stepnode, \"extensionFieldName\" );\n      sizeFieldName = XMLHandler.getTagValue( stepnode, \"sizeFieldName\" );\n    } catch ( Exception e ) {\n      throw new KettleXMLException( \"Unable to load step info from XML\", e );\n    }\n  }\n\n  public void allocate( int nrfiles, int nrfields ) {\n    fileName = new String[nrfiles];\n    fileMask = new String[nrfiles];\n    excludeFileMask = new String[nrfiles];\n    fileRequired = new String[nrfiles];\n    includeSubFolders = new String[nrfiles];\n\n    inputFields = new LDIFInputField[nrfields];\n  }\n\n  public void setDefault() {\n    shortFileFieldName = null;\n    pathFieldName = null;\n    hiddenFieldName = null;\n    lastModificationTimeFieldName = null;","sourceCodeStart":724,"sourceCodeEnd":760,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/ldifinput/LDIFInputMeta.java#L724-L760","documentation":"LDIFInputMeta's XML constructor (loadXML) wraps parsing of the step's saved XML in a try/catch and throws KettleXMLException('Unable to load step info from XML') if any XMLHandler call fails. This means the .ktr/.kjb file's XML for this step is malformed or missing expected tags, so the step metadata cannot be deserialized when the transformation loads.","triggerScenarios":"Opening/saving a transformation whose repository XML for the LDIF Input step is corrupt, hand-edited incorrectly, truncated, or produced by an incompatible plugin version (missing stepnode tags).","commonSituations":"Manually editing a .ktr file and breaking the <step> block; XML written by a newer/older Pentaho version with schema drift; corrupted file transfer (truncated XML); merge conflicts in a VCS-managed .ktr.","solutions":["Open the .ktr in a text editor and inspect the LDIF Input <step> XML block for malformed/missing tags.","Restore the transformation from backup or version control.","Recreate the LDIF Input step in Spoon (drag a fresh one and reconfigure).","Align Pentaho/plugin versions between the writer and reader of the file."],"exampleFix":"// before (hand-edited .ktr)\n// <filenamefield></filenamesfield>   <!-- mismatched tag -->\n// after\n// <filenamefield></filenamefield>","handlingStrategy":"try-catch","validationCode":"// Validate .ktr XML is well-formed before load\nDocumentBuilderFactory.newInstance().newDocumentBuilder()\n  .parse(new File(\"trans.ktr\")); // throws if malformed","typeGuard":null,"tryCatchPattern":"try {\n  TransMeta tm = new TransMeta(\"trans.ktr\");\n} catch (KettleXMLException e) {\n  log.error(\"Corrupt step XML: restore from VCS/backup or recreate the step\", e);\n}","preventionTips":["Never hand-edit .ktr XML without validating afterward","Keep transformations in version control","Keep Pentaho versions consistent between writers and readers"],"tags":["kettle","pentaho","xml","metadata","serialization"],"backgroundTag":"xml-parse-error","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"}