{"record":{"id":"f85588ec153de865","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-step-info-from-xml-xmlinputstreammeta","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":"plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/xmlinputstream/XMLInputStreamMeta.java","lineNumber":301,"sourceCode":"          \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"includeXmlElementLevelField\" ) );\n      xmlElementLevelField =\n          Const.NVL( XMLHandler.getTagValue( stepnode, \"xmlElementLevelField\" ), xmlElementLevelField );\n\n      includeXmlPathField = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"includeXmlPathField\" ) );\n      xmlPathField = Const.NVL( XMLHandler.getTagValue( stepnode, \"xmlPathField\" ), xmlPathField );\n\n      includeXmlParentPathField =\n          \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"includeXmlParentPathField\" ) );\n      xmlParentPathField = Const.NVL( XMLHandler.getTagValue( stepnode, \"xmlParentPathField\" ), xmlParentPathField );\n\n      includeXmlDataNameField = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"includeXmlDataNameField\" ) );\n      xmlDataNameField = Const.NVL( XMLHandler.getTagValue( stepnode, \"xmlDataNameField\" ), xmlDataNameField );\n\n      includeXmlDataValueField = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"includeXmlDataValueField\" ) );\n      xmlDataValueField = Const.NVL( XMLHandler.getTagValue( stepnode, \"xmlDataValueField\" ), xmlDataValueField );\n\n    } catch ( Exception e ) {\n      throw new KettleXMLException( \"Unable to load step info from XML\", e );\n    }\n  }\n\n  @Override\n  public Object clone() {\n    XMLInputStreamMeta retval = (XMLInputStreamMeta) super.clone();\n    // TODO check\n\n    return retval;\n  }\n\n  @Override\n  public String getXML() {\n    StringBuffer retval = new StringBuffer();\n    retval.append( \"    \" + XMLHandler.addTagValue( \"sourceFromInput\", sourceFromInput ) );\n    retval.append( \"    \" + XMLHandler.addTagValue( \"sourceFieldName\", sourceFieldName ) );\n    retval.append( \"    \" + XMLHandler.addTagValue( \"filename\", filename ) );\n    retval.append( \"    \" + XMLHandler.addTagValue( \"addResultFile\", addResultFile ) );","sourceCodeStart":283,"sourceCodeEnd":319,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/xmlinputstream/XMLInputStreamMeta.java#L283-L319","documentation":"XMLInputStreamMeta.loadXML() parses step configuration from a transformation XML node using XMLHandler.getTagValue(). Any exception while reading those attributes is wrapped in a KettleXMLException with the message 'Unable to load step info from XML', with the underlying cause chained. This is a serialization/deserialization boundary error: the step definition stored in a .ktr file is unreadable or invalid.","triggerScenarios":"Opening/validating a .ktr transformation whose XMLInputStream step XML node contains malformed XML, an unexpected node structure, or whose attribute parsing throws (e.g. XMLHandler.getTagValue fails on a malformed stepnode subtree). Also thrown when a transformation was written by an incompatible PDI version with an unreadable step entry.","commonSituations":"Hand-edited .ktr files with broken XML; transformations from newer PDI versions opened in older ones; corrupted repository exports; copying step XML between transformations with mismatched structure; encoding issues in the file.","solutions":["Open the .ktr in a text editor and validate the XML well-formedness (e.g. xmllint --noout file.ktr); fix syntax errors.","Check the chained cause exception (e.getCause()) to identify which element failed to parse.","Recreate the XMLInputStream step in Spoon and re-enter its settings instead of editing XML manually.","Verify the transformation was exported by a compatible PDI version; re-export or upgrade the PDI version.","Restore the .ktr from source control or a backup if the file is corrupted."],"exampleFix":"// before: hand-edited XML with a missing closing tag inside the step node\n<step name=\"XML Input\" type=\"XMLInputStream\">\n  <encoding>UTF-8\n</step>\n// after: well-formed step node\n<step name=\"XML Input\" type=\"XMLInputStream\">\n  <encoding>UTF-8</encoding>\n</step>","handlingStrategy":"try-catch","validationCode":"// Validate the .ktr is well-formed before loading\nDocument doc = XMLHandler.loadXMLFile(new File(\"trans.ktr\"));\nif (doc == null) throw new IllegalArgumentException(\"Malformed transformation XML\");","typeGuard":"boolean isReadableStepNode(Node stepnode) {\n  return stepnode != null && stepnode.getNodeType() == Node.ELEMENT_NODE\n      && \"step\".equals(stepnode.getNodeName());\n}","tryCatchPattern":"try {\n  transMeta.loadXML(...);\n} catch (KettleXMLException e) {\n  log.error(\"Step XML unreadable: {}\", e.getCause(), e);\n  // fall back to backup .ktr or prompt user to re-create the step\n}","preventionTips":["Never hand-edit .ktr files; use Spoon.","Keep PDI client and repository/export versions aligned.","Validate .ktr XML with a linter before committing or deploying.","Keep transformation files in version control so corruption is recoverable."],"tags":["kettle","xml","deserialization","transformation-metadata"],"backgroundTag":"schema-validation-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"}