{"record":{"id":"6e6e9f34de8c9124","repo":"pentaho/pentaho-kettle","slug":"required-input-field-curfield-getname-couldn-t-be-found-in","errorCode":null,"errorMessage":"Required input field [ + curField.getName() + ] couldn't be found in the step input","messagePattern":"Required input field \\[ \\+ curField\\.getName\\(\\) \\+ \\] couldn't be found in the step input","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/webservices/WebService.java","lineNumber":214,"sourceCode":"    if ( vCurrentRow == null ) {\n      setOutputDone();\n    }\n    return vCurrentRow != null;\n  }\n\n  private List<Integer> indexList;\n\n  private void defineIndexList( RowMetaInterface rowMeta, Object[] vCurrentRow ) throws KettleException {\n    // Create an index list for the input fields\n    //\n    indexList = new ArrayList<Integer>();\n    if ( rowMeta != null ) {\n      for ( WebServiceField curField : meta.getFieldsIn() ) {\n        int index = rowMeta.indexOfValue( curField.getName() );\n        if ( index >= 0 ) {\n          indexList.add( index );\n        } else {\n          throw new KettleException( \"Required input field [\"\n            + curField.getName() + \"] couldn't be found in the step input\" );\n        }\n      }\n    }\n\n    // Create a map for the output values too\n    //\n    for ( WebServiceField curField : meta.getFieldsOut() ) {\n      int index = data.outputRowMeta.indexOfValue( curField.getName() );\n      if ( index >= 0 ) {\n        // Keep a mapping between the web service name and the index of the target field.\n        // This makes it easier to populate the fields later on, reading back the result.\n        //\n        data.indexMap.put( curField.getWsName(), index );\n      }\n    }\n  }\n","sourceCodeStart":196,"sourceCodeEnd":232,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/webservices/WebService.java#L196-L232","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","solutions":["Open the WebService step dialog and update the Fields-In list to match the actual upstream fields","Add the missing field in the upstream step or a Select Values/Calculator step","Check for case differences between the field names (Kettle field names are case-sensitive)"],"exampleFix":"// before (upstream step removed field 'userId')\n// WebService step still lists input field 'userId' -> KettleException\n// after\n// In the WebService dialog, replace 'userId' with the renamed field 'user_id',\n// or add a Select Values step mapping user_id -> userId before the WebService step.","handlingStrategy":"validation","validationCode":"// before running, ensure every Fields-In entry exists in the input row\nRowMetaInterface inRow = transMeta.getPrevStepFields( stepMeta );\nfor ( WebServiceField f : meta.getFieldsIn() ) {\n  if ( inRow.indexOfValue( f.getName() ) < 0 ) {\n    throw new IllegalArgumentException( \"Field '\" + f.getName() + \"' not produced by upstream step\" );\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  trans.execute( null );\n} catch ( KettleException e ) {\n  if ( e.getMessage() != null && e.getMessage().contains( \"couldn't be found in the step input\" ) ) {\n    logError( \"WebService input field mapping is stale; update Fields-In in step dialog\" );\n  }\n}","preventionTips":["After renaming/removing upstream fields, re-open the WebService step and refresh Fields-In","Keep field names consistent (same case) across steps","Use a Select Values step to normalize field names before the WebService step","Use the transformation's field verification (hop line check) before deploying"],"tags":["kettle","webservice","schema","field-mapping"],"backgroundTag":"schema-validation-failed","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"}