pentaho/pentaho-kettle · error · KettleException

Required input field [ + curField.getName() + ] couldn't be…

Error message

Required input field [ + curField.getName() + ] couldn't be found in the step input

What it means

Thrown by WebService.defineIndexList() when a field configured as a SOAP request input (meta.getFieldsIn()) cannot be found in the input row's row metadata. The step builds an index list mapping each configured input field to its position in the incoming row; a missing field means the upstream step does not produce it, so it throws a KettleException with the field name embedded.

Solutions

  1. Open the WebService step dialog and update the Fields-In list to match the actual upstream fields
  2. Add the missing field in the upstream step or a Select Values/Calculator step
  3. Check for case differences between the field names (Kettle field names are case-sensitive)

Example fix

// before (upstream step removed field 'userId')
// WebService step still lists input field 'userId' -> KettleException
// after
// In the WebService dialog, replace 'userId' with the renamed field 'user_id',
// or add a Select Values step mapping user_id -> userId before the WebService step.
Defensive patterns

Strategy: validation

Validate before calling

// before running, ensure every Fields-In entry exists in the input row
RowMetaInterface inRow = transMeta.getPrevStepFields( stepMeta );
for ( WebServiceField f : meta.getFieldsIn() ) {
  if ( inRow.indexOfValue( f.getName() ) < 0 ) {
    throw new IllegalArgumentException( "Field '" + f.getName() + "' not produced by upstream step" );
  }
}

Try / catch

try {
  trans.execute( null );
} catch ( KettleException e ) {
  if ( e.getMessage() != null && e.getMessage().contains( "couldn't be found in the step input" ) ) {
    logError( "WebService input field mapping is stale; update Fields-In in step dialog" );
  }
}

Prevention

When it happens

Trigger: processRow() -> defineIndexList() with an input row whose RowMeta lacks a value whose name equals curField.getName() for at least one configured Fields-In entry (indexOfValue returns -1).

Common situations: Renaming or removing a field in an upstream step (Select Values, Text File Input) without updating the WebService step's input field list; conditional branches producing different schemas; field name case mismatch after a database change.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/webservices/WebService.java:214

    if ( vCurrentRow == null ) {
      setOutputDone();
    }
    return vCurrentRow != null;
  }

  private List<Integer> indexList;

  private void defineIndexList( RowMetaInterface rowMeta, Object[] vCurrentRow ) throws KettleException {
    // Create an index list for the input fields
    //
    indexList = new ArrayList<Integer>();
    if ( rowMeta != null ) {
      for ( WebServiceField curField : meta.getFieldsIn() ) {
        int index = rowMeta.indexOfValue( curField.getName() );
        if ( index >= 0 ) {
          indexList.add( index );
        } else {
          throw new KettleException( "Required input field ["
            + curField.getName() + "] couldn't be found in the step input" );
        }
      }
    }

    // Create a map for the output values too
    //
    for ( WebServiceField curField : meta.getFieldsOut() ) {
      int index = data.outputRowMeta.indexOfValue( curField.getName() );
      if ( index >= 0 ) {
        // Keep a mapping between the web service name and the index of the target field.
        // This makes it easier to populate the fields later on, reading back the result.
        //
        data.indexMap.put( curField.getWsName(), index );
      }
    }
  }

View on GitHub (pinned to f3058517a1)