pentaho/pentaho-kettle · error · IllegalArgumentException

MappingInput.Exception.IllegalArgumentStepName

MappingInput.Exception.IllegalArgumentStepName

Error message

Step name should not be null.

What it means

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.

Solutions

  1. Pass the actual name of the Mapping Input step as mappingStepname.
  2. If there are truly no source steps, pass an empty array so the stepname check is skipped (per the length != 0 guard).
  3. Read the step name from the MappingMeta / TransMeta configuration instead of hardcoding null.

Example fix

// before
mappingInput.setConnectorSteps(steps, renames, null);
// after
mappingInput.setConnectorSteps(steps, renames, mappingInputStepMeta.getName());
Defensive patterns

Strategy: validation

Validate before calling

if (sourceSteps.length > 0 && mappingStepname == null) {
  mappingStepname = mappingInputStepMeta.getName(); // fill from metadata before calling
}

Type guard

boolean needsStepName(StepInterface[] steps, String name) { return steps != null && steps.length != 0 && name != null; }

Try / catch

try {
  mappingInput.setConnectorSteps(steps, renames, mappingStepname);
} catch (IllegalArgumentException e) {
  if (e.getMessage().contains("Step name should not be null")) {
    // supply the Mapping Input step's configured name
  }
  throw e;
}

Prevention

When it happens

Trigger: Calling setConnectorSteps(new StepInterface[]{step}, renames, null) — source steps exist but no step name was supplied for the rowset thread naming.

Common situations: Programmatic mapping wiring where the caller hardcodes null for the stepname argument; refactoring that dropped the mapping input step name; custom test harnesses.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/47f6bacaf15a4e89. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/mappinginput/MappingInput.java:192

    return super.init( smi, sdi );
  }

  public void setConnectorSteps( StepInterface[] sourceSteps, List<MappingValueRename> valueRenames,
      String mappingStepname ) {

    if ( sourceSteps == null ) {
      throw new IllegalArgumentException( BaseMessages
          .getString( PKG, "MappingInput.Exception.IllegalArgumentSourceStep" ) );
    }

    if ( valueRenames == null ) {
      throw new IllegalArgumentException( BaseMessages
          .getString( PKG, "MappingInput.Exception.IllegalArgumentValueRename" ) );
    }

    if ( sourceSteps.length != 0 ) {
      if ( mappingStepname == null ) {
        throw new IllegalArgumentException( BaseMessages
          .getString( PKG, "MappingInput.Exception.IllegalArgumentStepName" ) );
      }
    }

    for ( StepInterface sourceStep : sourceSteps ) {

      // We don't want to add the mapping-to-mapping rowset
      //
      if ( !sourceStep.isMapping() ) {
        // OK, before we leave, make sure there is a rowset that covers the path to this target step.
        // We need to create a new RowSet and add it to the Input RowSets of the target step
        //
        BlockingRowSet rowSet = new BlockingRowSet( getTransMeta().getSizeRowset() );

        // This is always a single copy, both for source and target...
        //
        rowSet.setThreadNameFromToCopy( sourceStep.getStepname(), 0, mappingStepname, 0 );

View on GitHub (pinned to f3058517a1)