{"record":{"id":"b1aea08c6c3f31ae","repo":"pentaho/pentaho-kettle","slug":"mergejoin-exception-unabletofindspecifiedstep","errorCode":"MergeJoin.Exception.UnableToFindSpecifiedStep","errorMessage":"MergeJoin.Exception.UnableToFindSpecifiedStep","messagePattern":"MergeJoin\\.Exception\\.UnableToFindSpecifiedStep","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/mergejoin/MergeJoin.java","lineNumber":76,"sourceCode":"    Trans trans ) {\n    super( stepMeta, stepDataInterface, copyNr, transMeta, trans );\n  }\n\n  public boolean processRow( StepMetaInterface smi, StepDataInterface sdi ) throws KettleException {\n    meta = (MergeJoinMeta) smi;\n    data = (MergeJoinData) sdi;\n    int compare;\n\n    if ( first ) {\n      first = false;\n\n      // Find the RowSet to read from\n      //\n      List<StreamInterface> infoStreams = meta.getStepIOMeta().getInfoStreams();\n\n      data.oneRowSet = findInputRowSet( infoStreams.get( 0 ).getStepname() );\n      if ( data.oneRowSet == null ) {\n        throw new KettleException( BaseMessages.getString(\n          PKG, \"MergeJoin.Exception.UnableToFindSpecifiedStep\", infoStreams.get( 0 ).getStepname() ) );\n      }\n\n      data.twoRowSet = findInputRowSet( infoStreams.get( 1 ).getStepname() );\n      if ( data.twoRowSet == null ) {\n        throw new KettleException( BaseMessages.getString(\n          PKG, \"MergeJoin.Exception.UnableToFindSpecifiedStep\", infoStreams.get( 1 ).getStepname() ) );\n      }\n\n      data.one = getRowFrom( data.oneRowSet );\n      if ( data.one != null ) {\n        data.oneMeta = data.oneRowSet.getRowMeta();\n      } else {\n        data.one = null;\n        data.oneMeta = getTransMeta().getStepFields( infoStreams.get( 0 ).getStepname() );\n      }\n\n      data.two = getRowFrom( data.twoRowSet );","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/mergejoin/MergeJoin.java#L58-L94","documentation":"MergeJoin.processRow() locates the RowSet for its first (reference) input stream by step name via findInputRowSet(). When it returns null — no such input rowset is registered for this step — it throws this KettleException naming the missing step. The merge join cannot read sorted input from its first hop, so processing aborts.","triggerScenarios":"The step listed first in the MergeJoin meta's info streams has no connected hop into the Merge Join step — hop deleted or renamed, step name mismatch, or the transformation was executed with a disabled/removed source step.","commonSituations":"Renaming the first input step without re-opening the Merge Join dialog (hop references stale names); copying a Merge Join step into another transformation without reconnecting inputs; disabling a source step during debugging; partial transformations assembled programmatically.","solutions":["Open the Merge Join step dialog and verify both input steps listed exist and are connected with hops.","Re-create the hop from the first (reference) source step to the Merge Join step after any rename.","Ensure both source steps are enabled and part of the executed transformation.","If building the transformation in code, call meta.getStepIOMeta().getInfoStreams() updates and set correct step names before execution."],"exampleFix":"// before: stale step name after rename\ninfoStreams.get(0).setStepname(\"Old Source\");\n\n// after: reference the actual connected step\ninfoStreams.get(0).setStepname(\"Sorted Customer Rows\"); // step that actually hops into Merge Join","handlingStrategy":"validation","validationCode":"// before execution, verify both inputs are connected\nfor (StreamInterface stream : mergeJoinMeta.getStepIOMeta().getInfoStreams()) {\n  StepMeta source = transMeta.findStep(stream.getStepname());\n  if (source == null || !transMeta.isStepUsedInHops(source)) {\n    throw new IllegalStateException(\"MergeJoin input step missing/disconnected: \" + stream.getStepname());\n  }\n}","typeGuard":"boolean hasConnectedInput(TransMeta transMeta, StreamInterface stream) {\n  StepMeta s = transMeta.findStep(stream.getStepname());\n  return s != null && !s.isDisabled() && transMeta.isStepUsedInHops(s);\n}","tryCatchPattern":"try {\n  processRow();\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"UnableToFindSpecifiedStep\")) {\n    logError(\"Reconnect the missing MergeJoin input hop in Spoon and re-run\", e);\n  }\n  throw e;\n}","preventionTips":["After renaming any input step, reopen the Merge Join dialog and reselect it.","Run Spoon's hop/step verification before executing transformations.","Avoid copying Merge Join steps between transformations without rewiring.","Don't disable source steps that feed a merge join."],"tags":["kettle","merge-join","step-wiring","rowset"],"backgroundTag":"resource-not-found","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"}