{"record":{"id":"9fbd8cf484b302a9","repo":"pentaho/pentaho-kettle","slug":"mappinginput-exception-illegalargumentvaluerename","errorCode":"MappingInput.Exception.IllegalArgumentValueRename","errorMessage":"Rename values should not be null.","messagePattern":"Rename values 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":186,"sourceCode":"  }\n\n  public boolean init( StepMetaInterface smi, StepDataInterface sdi ) {\n    meta = (MappingInputMeta) smi;\n    data = (MappingInputData) sdi;\n\n    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        //","sourceCodeStart":168,"sourceCodeEnd":204,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/mappinginput/MappingInput.java#L168-L204","documentation":"setConnectorSteps() requires a non-null list of MappingValueRename entries describing how parent fields map into the sub-transformation. A null list throws an IllegalArgumentException, because data.valueRenames is later iterated unconditionally in processRow.","triggerScenarios":"Calling setConnectorSteps(sourceSteps, null, mappingStepname), or an upstream code path that builds the rename list lazily and yields null.","commonSituations":"Programmatic mapping construction where the caller forgets to collect mapping-parameter renames; older API versions where the argument was optional; test code probing null handling.","solutions":["Pass an empty list (new ArrayList<>()) instead of null when no renames apply.","Collect MappingValueRename entries from the Mapping step's field-mapping definition before calling setConnectorSteps.","Guard the call site: only invoke after the mapping metadata has been initialized."],"exampleFix":"// before\nmappingInput.setConnectorSteps(steps, null, \"Mapping input\");\n// after\nmappingInput.setConnectorSteps(steps, Collections.emptyList(), \"Mapping input\");","handlingStrategy":"type-guard","validationCode":"if (valueRenames == null) {\n  valueRenames = Collections.emptyList();\n}","typeGuard":"boolean isUsableRenames(List<MappingValueRename> renames) { return renames != null; }","tryCatchPattern":"try {\n  mappingInput.setConnectorSteps(steps, renames, name);\n} catch (IllegalArgumentException e) {\n  if (e.getMessage().contains(\"Rename values should not be null\")) {\n    // pass Collections.emptyList() when no renames apply\n  }\n  throw e;\n}","preventionTips":["Collect renames from MappingMeta's field-mapping definition before wiring.","Use Collections.emptyList() as the no-rename default.","Validate arguments with Objects.requireNonNull(valueRenames) at your own API boundary."],"tags":["kettle","pdi","illegal-argument","null-check","api-misuse"],"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"}