{"record":{"id":"47f6bacaf15a4e89","repo":"pentaho/pentaho-kettle","slug":"mappinginput-exception-illegalargumentstepname","errorCode":"MappingInput.Exception.IllegalArgumentStepName","errorMessage":"Step name should not be null.","messagePattern":"Step name should not be null\\.","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/mappinginput/MappingInput.java","lineNumber":192,"sourceCode":"    return super.init( smi, sdi );\n  }\n\n  public void setConnectorSteps( StepInterface[] sourceSteps, List<MappingValueRename> valueRenames,\n      String mappingStepname ) {\n\n    if ( sourceSteps == null ) {\n      throw new IllegalArgumentException( BaseMessages\n          .getString( PKG, \"MappingInput.Exception.IllegalArgumentSourceStep\" ) );\n    }\n\n    if ( valueRenames == null ) {\n      throw new IllegalArgumentException( BaseMessages\n          .getString( PKG, \"MappingInput.Exception.IllegalArgumentValueRename\" ) );\n    }\n\n    if ( sourceSteps.length != 0 ) {\n      if ( mappingStepname == null ) {\n        throw new IllegalArgumentException( BaseMessages\n          .getString( PKG, \"MappingInput.Exception.IllegalArgumentStepName\" ) );\n      }\n    }\n\n    for ( StepInterface sourceStep : sourceSteps ) {\n\n      // We don't want to add the mapping-to-mapping rowset\n      //\n      if ( !sourceStep.isMapping() ) {\n        // OK, before we leave, make sure there is a rowset that covers the path to this target step.\n        // We need to create a new RowSet and add it to the Input RowSets of the target step\n        //\n        BlockingRowSet rowSet = new BlockingRowSet( getTransMeta().getSizeRowset() );\n\n        // This is always a single copy, both for source and target...\n        //\n        rowSet.setThreadNameFromToCopy( sourceStep.getStepname(), 0, mappingStepname, 0 );\n","sourceCodeStart":174,"sourceCodeEnd":210,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/mappinginput/MappingInput.java#L174-L210","documentation":"When at least one source step is provided (sourceSteps.length != 0), setConnectorSteps() requires a non-null mappingStepname to label the BlockingRowSet connecting the parent step to the mapping input. A null name throws an IllegalArgumentException.","triggerScenarios":"Calling setConnectorSteps(new StepInterface[]{step}, renames, null) — source steps exist but no step name was supplied for the rowset thread naming.","commonSituations":"Programmatic mapping wiring where the caller hardcodes null for the stepname argument; refactoring that dropped the mapping input step name; custom test harnesses.","solutions":["Pass the actual name of the Mapping Input step as mappingStepname.","If there are truly no source steps, pass an empty array so the stepname check is skipped (per the length != 0 guard).","Read the step name from the MappingMeta / TransMeta configuration instead of hardcoding null."],"exampleFix":"// before\nmappingInput.setConnectorSteps(steps, renames, null);\n// after\nmappingInput.setConnectorSteps(steps, renames, mappingInputStepMeta.getName());","handlingStrategy":"validation","validationCode":"if (sourceSteps.length > 0 && mappingStepname == null) {\n  mappingStepname = mappingInputStepMeta.getName(); // fill from metadata before calling\n}","typeGuard":"boolean needsStepName(StepInterface[] steps, String name) { return steps != null && steps.length != 0 && name != null; }","tryCatchPattern":"try {\n  mappingInput.setConnectorSteps(steps, renames, mappingStepname);\n} catch (IllegalArgumentException e) {\n  if (e.getMessage().contains(\"Step name should not be null\")) {\n    // supply the Mapping Input step's configured name\n  }\n  throw e;\n}","preventionTips":["Always pass the Mapping Input step's actual name from TransMeta/StepMeta.","Only pass null stepname together with an empty source-step array.","Validate wiring arguments in a small helper before invoking the API."],"tags":["kettle","pdi","illegal-argument","null-check","step-name"],"backgroundTag":"null-argument","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"}