{"record":{"id":"1ab328a91a035dc9","repo":"pentaho/pentaho-kettle","slug":"erreur-finding-step","errorCode":null,"errorMessage":"Erreur finding step [","messagePattern":"Erreur finding step \\[","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/blockuntilstepsfinish/BlockUntilStepsFinish.java","lineNumber":86,"sourceCode":"      data.stepInterfaces = new ConcurrentHashMap<Integer, StepInterface>();\n      for ( int i = 0; i < stepnrs; i++ ) {\n        // We can not get metrics from current step\n        if ( stepnames[i].equals( getStepname() ) ) {\n          throw new KettleException( \"You can not wait for step [\" + stepnames[i] + \"] to finish!\" );\n        }\n        if ( targetSteps != null ) {\n          // We can not metrics from the target steps\n          for ( int j = 0; j < targetSteps.length; j++ ) {\n            if ( stepnames[i].equals( targetSteps[j] ) ) {\n              throw new KettleException( \"You can not get metrics for the target step [\" + targetSteps[j] + \"]!\" );\n            }\n          }\n        }\n\n        int copyNr = Const.toInt( environmentSubstitute( meta.getStepCopyNr()[ i ] ), 0 );\n        StepInterface step = getDispatcher().findBaseSteps( stepnames[i] ).get( copyNr );\n        if ( step == null ) {\n          throw new KettleException( \"Erreur finding step [\" + stepnames[i] + \"] nr copy=\" + copyNr + \"!\" );\n        }\n\n        data.stepInterfaces.put( i, getDispatcher().findBaseSteps( stepnames[i] ).get( copyNr ) );\n      }\n    } // end if first\n\n    // Wait until all specified steps have finished!\n    while ( data.continueLoop && !isStopped() ) {\n      data.continueLoop = false;\n      Iterator<Entry<Integer, StepInterface>> it = data.stepInterfaces.entrySet().iterator();\n      while ( it.hasNext() ) {\n        Entry<Integer, StepInterface> e = it.next();\n        StepInterface step = e.getValue();\n        if ( step.getStatus() != StepExecutionStatus.STATUS_FINISHED ) {\n          // This step is still running...\n          data.continueLoop = true;\n        } else {\n          // We have done with this step.","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/blockuntilstepsfinish/BlockUntilStepsFinish.java#L68-L104","documentation":"BlockUntilStepsFinish (Get rows from previous steps until no more) looks up the actual StepInterface objects of the steps it waits on, selected by step name and copy number. It throws this KettleException when findBaseSteps(stepname) returned no step at the requested copy index, meaning the referenced step/copy does not exist (yet) in the running transformation.","triggerScenarios":"In processRow during init/first-row processing: copyNr = Const.toInt(environmentSubstitute(meta.getStepCopyNr()[i]),0) then getDispatcher().findBaseSteps(stepnames[i]).get(copyNr) returns null because no step with that name has registered a base step for that copy number.","commonSituations":"Typo in the step name configured in the 'steps to wait for' grid; the target step is not in the same transformation; wrong/nonexistent copy number (e.g. copy 1 specified but the step has a single copy 0); variables in the step name or copy-nr field that do not resolve at runtime; step name changed after the BlockUntilStepsFinish settings were saved.","solutions":["Verify the step names and copy numbers listed in the BlockUntilStepsFinish dialog exactly match the target steps in the same transformation (name is case-sensitive; copies are 0-indexed).","If the step name uses variables, confirm they resolve to the actual step name at runtime.","Remove or correct copy-number entries that exceed the target step's number of copies.","If steps were renamed, re-open the BlockUntilStepsFinish step and re-select the target steps."],"exampleFix":"// before (wrong copy number for a single-copied target step)\n<step_name>Target</step_name><CopyNr>1</CopyNr>\n// after\n<step_name>Target</step_name><CopyNr>0</CopyNr>","handlingStrategy":"validation","validationCode":"for (int i = 0; i < stepnames.length; i++) {\n  int copyNr = Const.toInt(transMeta.environmentSubstitute(meta.getStepCopyNr()[i]), 0);\n  StepMeta sm = transMeta.findStep(stepnames[i]);\n  if (sm == null || copyNr >= sm.getCopies(transMeta)) {\n    throw new IllegalStateException(\"Step not found or bad copy nr: \" + stepnames[i] + \"#\" + copyNr);\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  // run transformation\n} catch (KettleException e) {\n  if (e.getMessage().startsWith(\"Erreur finding step\")) {\n    // correct step name/copy config and retry\n  } else { throw e; }\n}","preventionTips":["Re-select target steps from the dialog list instead of typing names","Remember copy numbers are 0-indexed and must exist on the target step","Verify variables resolve before runtime","Keep the monitored steps in the same transformation"],"tags":["kettle","transformation","step-lookup","configuration"],"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"}