{"record":{"id":"e09fe2453a319090","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-step-info-from-xml-prioritizestreamsmeta","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/prioritizestreams/PrioritizeStreamsMeta.java","lineNumber":109,"sourceCode":"  @Override\n  public void getFields( Bowl bowl, RowMetaInterface rowMeta, String origin, RowMetaInterface[] info, StepMeta nextStep,\n    VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {\n    // Default: nothing changes to rowMeta\n  }\n\n  private void readData( Node stepnode, List<DatabaseMeta> databases ) throws KettleXMLException {\n    try {\n      Node steps = XMLHandler.getSubNode( stepnode, \"steps\" );\n      int nrsteps = XMLHandler.countNodes( steps, \"step\" );\n\n      allocate( nrsteps );\n\n      for ( int i = 0; i < nrsteps; i++ ) {\n        Node fnode = XMLHandler.getSubNodeByNr( steps, \"step\", i );\n        stepName[i] = XMLHandler.getTagValue( fnode, \"name\" );\n      }\n    } catch ( Exception e ) {\n      throw new KettleXMLException( \"Unable to load step info from XML\", e );\n    }\n  }\n\n  public String getXML() {\n    StringBuilder retval = new StringBuilder();\n\n    retval.append( \"    <steps>\" + Const.CR );\n    for ( int i = 0; i < stepName.length; i++ ) {\n      retval.append( \"      <step>\" + Const.CR );\n      retval.append( \"        \" + XMLHandler.addTagValue( \"name\", stepName[i] ) );\n      retval.append( \"        </step>\" + Const.CR );\n    }\n    retval.append( \"      </steps>\" + Const.CR );\n\n    return retval.toString();\n  }\n\n  public void setDefault() {","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/prioritizestreams/PrioritizeStreamsMeta.java#L91-L127","documentation":"KettleXMLException thrown by PrioritizeStreamsMeta.readData (via loadXML) when parsing the step's XML fails. It reads the <steps> node and each <step> sub-node to get the names of the streams to prioritize; any exception during that is wrapped with this generic message. It indicates malformed or incompatible XML for this step.","triggerScenarios":"loadXML hands readData a step node where the <steps> container or its <step> children are missing/malformed, so XMLHandler calls throw while extracting step names.","commonSituations":"Manually edited ktr; XML generated by an incompatible PDI version; truncated or corrupted transformation file.","solutions":["Validate the .ktr XML around the Prioritize Streams step node, ensuring <steps><step><name>... structure is intact.","Recreate/re-save the step in Spoon to regenerate valid XML.","Re-export the transformation from the original PDI version if a version mismatch is suspected."],"exampleFix":"// before: missing <steps> wrapper\n<step><type>PrioritizeStreams</type></step>\n// after\n<step><type>PrioritizeStreams</type><fields><steps><step><name>Input A</name></step></steps></fields></step>","handlingStrategy":"try-catch","validationCode":"// Sanity-check the step node XML before loadXML\nNode stepsNode = XMLHandler.getSubNode(stepnode, \"steps\");\nif (stepsNode == null || XMLHandler.countNodes(stepsNode, \"step\") == 0) throw new IllegalStateException(\"missing <steps> in Prioritize Streams XML\");","typeGuard":null,"tryCatchPattern":"try { meta.loadXML(stepNode, databases, metaStore); } catch (KettleXMLException e) { log.error(\"Bad PrioritizeStreams XML: \" + e.getCause(), e); throw e; }","preventionTips":["Edit transformations only through Spoon or the metadata API","Validate .ktr files with an XML schema/linter in CI","Pin PDI versions across teams sharing transformation files"],"tags":["kettle","xml-parsing","transformation-metadata"],"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"}