{"record":{"id":"65ee7b8d9228ce40","repo":"pentaho/pentaho-kettle","slug":"appendmeta-exception-unabletoloadstepinfo","errorCode":null,"errorMessage":"AppendMeta.Exception.UnableToLoadStepInfo","messagePattern":"AppendMeta\\.Exception\\.UnableToLoadStepInfo","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/append/AppendMeta.java","lineNumber":100,"sourceCode":"  public String getXML() {\n    StringBuilder retval = new StringBuilder();\n\n    List<StreamInterface> infoStreams = getStepIOMeta().getInfoStreams();\n    retval.append( XMLHandler.addTagValue( \"head_name\", infoStreams.get( 0 ).getStepname() ) );\n    retval.append( XMLHandler.addTagValue( \"tail_name\", infoStreams.get( 1 ).getStepname() ) );\n\n    return retval.toString();\n  }\n\n  private void readData( Node stepnode ) throws KettleXMLException {\n    try {\n      List<StreamInterface> infoStreams = getStepIOMeta().getInfoStreams();\n      StreamInterface headStream = infoStreams.get( 0 );\n      StreamInterface tailStream = infoStreams.get( 1 );\n      headStream.setSubject( XMLHandler.getTagValue( stepnode, \"head_name\" ) );\n      tailStream.setSubject( XMLHandler.getTagValue( stepnode, \"tail_name\" ) );\n    } catch ( Exception e ) {\n      throw new KettleXMLException( BaseMessages.getString( PKG, \"AppendMeta.Exception.UnableToLoadStepInfo\" ), e );\n    }\n  }\n\n  public void setDefault() {\n  }\n\n  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {\n    try {\n      List<StreamInterface> infoStreams = getStepIOMeta().getInfoStreams();\n      StreamInterface headStream = infoStreams.get( 0 );\n      StreamInterface tailStream = infoStreams.get( 1 );\n      headStream.setSubject( rep.getStepAttributeString( id_step, \"head_name\" ) );\n      tailStream.setSubject( rep.getStepAttributeString( id_step, \"tail_name\" ) );\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"AppendMeta.Exception.UnexpectedErrorReadingStepInfo\" ), e );\n    }\n  }","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/append/AppendMeta.java#L82-L118","documentation":"AppendMeta.readData throws KettleXMLException wrapping message 'AppendMeta.Exception.UnableToLoadStepInfo' when parsing the step's XML node fails. It reads head_name and tail_name tags via XMLHandler; any exception during that DOM access (malformed XML, missing stepnode) is wrapped. It signals the transformation .ktr could not be deserialized for this Append step.","triggerScenarios":"Loading a .ktr file whose <step type='Append'> node is malformed or whose XML is otherwise unreadable, via loadXML -> readData; XMLHandler.getTagValue throwing or getStepIOMeta().getInfoStreams() lacking entries.","commonSituations":"Hand-edited or truncated .ktr files; transformations saved by a newer/older Pentaho version with a changed XML schema; corrupted repository export imported from XML.","solutions":["Open the .ktr in Spoon and re-save the Append step so the head_name/tail_name XML tags are regenerated correctly.","Validate the XML file is well-formed (xmllint) and not truncated.","Check that head/tail hop steps referenced by the Append step still exist and are connected.","Align Pentaho Kettle versions between the environment that saved the file and the one loading it."],"exampleFix":"// before: hand-edited XML missing tags\n<step name=\"Append\"><type>Append</type></step>\n// after: regenerated by Spoon with both hop names\n<step name=\"Append\"><head_name>Step A</head_name><tail_name>Step B</tail_name></step>","handlingStrategy":"try-catch","validationCode":"// Before loading: check XML is well-formed and has the tags\nDocument doc = XMLHandler.loadXMLFile(ktrFile);\nif (XMLHandler.getTagValue(doc, \"step\", \"head_name\") == null\n    || XMLHandler.getTagValue(doc, \"step\", \"tail_name\") == null) {\n  throw new IllegalArgumentException(\"Append step XML missing head_name/tail_name\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  transMeta.loadXML(file, null, null, null, null, true, monitor);\n} catch (KettleXMLException e) {\n  if (e.getMessage().contains(\"UnableToLoadStepInfo\") || e.getCause() != null) {\n    logError(\"Corrupt Append step XML: \" + e.getMessage(), e);\n    // fall back to re-exporting the transformation from a good source\n  }\n}","preventionTips":["Never hand-edit .ktr files; edit through Spoon.","Keep Kettle versions consistent across environments.","Keep transformations under version control to diff/revert XML changes."],"tags":["kettle","xml","metadata-load","transformation"],"backgroundTag":"json-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"}