{"record":{"id":"fc9584bbb520a41c","repo":"pentaho/pentaho-kettle","slug":"mappingdialog-exception-stepnamenotfound","errorCode":"MappingDialog.Exception.StepNameNotFound","errorMessage":"The step with name '{0}' couldn't be found.","messagePattern":"The step with name '(.+?)' couldn't be found\\.","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/mapping/Mapping.java","lineNumber":341,"sourceCode":"    // not receive ANY input and output rowsets.\n    // This is an exception to the general rule, built into\n    // Trans.prepareExecution()\n    //\n    // A Mapping Input step is supposed to read directly from the previous\n    // steps.\n    // A Mapping Output step is supposed to write directly to the next steps.\n\n    // OK, check the input mapping definitions and look up the steps to read\n    // from.\n    //\n    StepInterface[] sourceSteps;\n    for ( MappingIODefinition inputDefinition : meta.getInputMappings() ) {\n      // If we have a single step to read from, we use this\n      //\n      if ( !Utils.isEmpty( inputDefinition.getInputStepname() ) ) {\n        StepInterface sourceStep = getTrans().findRunThread( inputDefinition.getInputStepname() );\n        if ( sourceStep == null ) {\n          throw new KettleException( BaseMessages.getString( PKG, \"MappingDialog.Exception.StepNameNotFound\",\n              inputDefinition.getInputStepname() ) );\n        }\n        sourceSteps = new StepInterface[] { sourceStep, };\n      } else {\n        // We have no defined source step.\n        // That means that we're reading from all input steps that this mapping\n        // step has.\n        //\n        List<StepMeta> prevSteps = getTransMeta().findPreviousSteps( getStepMeta() );\n\n        // TODO: Handle remote steps from: getStepMeta().getRemoteInputSteps()\n        //\n\n        // Let's read data from all the previous steps we find...\n        // The origin is the previous step\n        // The target is the Mapping Input step.\n        //\n        sourceSteps = new StepInterface[prevSteps.size()];","sourceCodeStart":323,"sourceCodeEnd":359,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/mapping/Mapping.java#L323-L359","documentation":"The Mapping step lets you pin which parent-transformation step feeds each mapping input via an input step name. During prepareMappingExecution, if a configured input step name does not match any running step in the parent transformation (findRunThread returns null), this exception is thrown.","triggerScenarios":"Mapping metadata (MappingIODefinition.inputStepname) references a step name that does not exist, was renamed, or has not started (failed init) in the parent transformation when init() runs.","commonSituations":"Renaming or deleting a step in the parent transformation after configuring the mapping input; copy-pasting transformations between environments where step names differ; XML edits that desynchronize names.","solutions":["Open the Mapping step dialog and re-select the correct 'Input step' from the dropdown so it matches an existing step name.","Rename the step in the parent transformation back to the name the mapping expects.","Compare the Main input path configuration in the Mapping dialog with actual parent step names.","If the mapping is built programmatically, ensure meta.getInputMappings() entries use step names that exist in the parent TransMeta."],"exampleFix":"// before\nmappingMeta.getInputMappings().get(0).setInputStepname(\"Old Step Name\");\n// after\nmappingMeta.getInputMappings().get(0).setInputStepname(\"Sort rows 2\");","handlingStrategy":"validation","validationCode":"for (MappingIODefinition def : meta.getInputMappings()) {\n  if (!Utils.isEmpty(def.getInputStepname())\n      && transMeta.findStep(def.getInputStepname()) == null) {\n    throw new IllegalStateException(\"Input step not found: \" + def.getInputStepname());\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  mapping.init();\n} catch (KettleException e) {\n  if (String.valueOf(e.getMessage()).startsWith(\"The step with name\")) {\n    logError(\"Mapping input step name no longer exists — fix Mapping dialog Input tab\", e);\n  } else { throw e; }\n}","preventionTips":["After renaming any step, re-open the Mapping step dialog and re-select input steps.","Avoid manual step-name edits in ktr XML.","Use stable step names across environments.","Validate metadata programmatically before execution."],"tags":["pdi","kettle","mapping-step","step-not-found","config"],"backgroundTag":"entity-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"}