{"record":{"id":"5480cfd658e3f5b9","repo":"pentaho/pentaho-kettle","slug":"transhopmeta-exception-unabletoloadhopinfo","errorCode":null,"errorMessage":"TransHopMeta.Exception.UnableToLoadHopInfo","messagePattern":"TransHopMeta\\.Exception\\.UnableToLoadHopInfo","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/TransHopMeta.java","lineNumber":71,"sourceCode":"  }\n\n  public TransHopMeta() {\n    this( null, null, false );\n  }\n\n  public TransHopMeta( Node hopnode, List<StepMeta> steps ) throws KettleXMLException {\n    try {\n      this.from = searchStep( steps, XMLHandler.getTagValue( hopnode, TransHopMeta.XML_FROM_TAG ) );\n      this.to = searchStep( steps, XMLHandler.getTagValue( hopnode, TransHopMeta.XML_TO_TAG ) );\n      String en = XMLHandler.getTagValue( hopnode, \"enabled\" );\n\n      if ( en == null ) {\n        enabled = true;\n      } else {\n        enabled = en.equalsIgnoreCase( \"Y\" );\n      }\n    } catch ( Exception e ) {\n      throw new KettleXMLException( BaseMessages.getString( PKG, \"TransHopMeta.Exception.UnableToLoadHopInfo\" ), e );\n    }\n  }\n\n  public void setFromStep( StepMeta from ) {\n    this.from = from;\n  }\n\n  public void setToStep( StepMeta to ) {\n    this.to = to;\n  }\n\n  public StepMeta getFromStep() {\n    return this.from;\n  }\n\n  public StepMeta getToStep() {\n    return this.to;\n  }","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/TransHopMeta.java#L53-L89","documentation":"A KettleXMLException (message key TransHopMeta.Exception.UnableToLoadHopInfo) thrown when a transformation hop cannot be loaded from its XML node — parsing from/to step names or the enabled flag threw an exception, which is attached as the cause.","triggerScenarios":"TransHopMeta(Node hopnode, List<StepMeta> steps) encountering malformed <hop> XML (missing/broken <from>, <to>, or <enabled> tags).","commonSituations":"Hand-edited .ktr files where hop XML was corrupted; steps referenced by a hop were removed; files written by incompatible Kettle versions; truncated copy/paste of transformation XML.","solutions":["Open the .ktr in Spoon and repair or delete the broken hop","Verify each <hop> has valid <from>/<to> step names matching existing <step> entries","Ensure <enabled> contains Y or N if present","Re-save the transformation from Spoon to regenerate canonical XML"],"exampleFix":"// before: hop referencing a removed step\n<hop><from>Old Step</from><to>Table output</to><enabled>Y</enabled></hop>\n// after: fix or remove the hop so names match existing steps\n<hop><from>CSV input</from><to>Table output</to><enabled>Y</enabled></hop>","handlingStrategy":"try-catch","validationCode":"for (Node hop : hopNodes) {\n  if (XMLHandler.getTagValue(hop, \"from\") == null || XMLHandler.getTagValue(hop, \"to\") == null)\n    throw new KettleException(\"hop missing from/to\");\n}","typeGuard":null,"tryCatchPattern":"try { new TransHopMeta(hopNode, steps); } catch (KettleXMLException e) { log.error(\"Invalid hop XML: \" + e.getCause(), e); }","preventionTips":["Ensure hops reference existing step names","Avoid manual XML edits to .ktr files","Re-save transformations in Spoon after upgrades"],"tags":["kettle","xml","hop","transformation"],"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"}