{"record":{"id":"3eb5c99d405eb30c","repo":"pentaho/pentaho-kettle","slug":"httppost-exception-couldnotfindfield","errorCode":null,"errorMessage":"HTTPPOST.Exception.CouldnotFindField","messagePattern":"HTTPPOST\\.Exception\\.CouldnotFindField","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/httppost/HTTPPOST.java","lineNumber":414,"sourceCode":"            data.useHeaderParameters = true; // at least one header parameter\n            nrheader++;\n          } else {\n            data.useBodyParameters = true; // at least one body parameter\n            nrbody++;\n          }\n        }\n        data.header_parameters_nrs = new int[ nrheader ];\n        data.headerParameters = new NameValuePair[ nrheader ];\n        data.body_parameters_nrs = new int[ nrbody ];\n        data.bodyParameters = new NameValuePair[ nrbody ];\n        int posHeader = 0;\n        int posBody = 0;\n        for ( int i = 0; i < nrargs; i++ ) {\n          int fieldIndex = data.inputRowMeta.indexOfValue( meta.getArgumentField()[ i ] );\n          if ( fieldIndex < 0 ) {\n            logError( BaseMessages.getString( PKG, \"HTTPPOST.Log.ErrorFindingField\" ) + meta.getArgumentField()[ i ]\n              + \"]\" );\n            throw new KettleStepException( BaseMessages.getString( PKG, \"HTTPPOST.Exception.CouldnotFindField\", meta\n              .getArgumentField()[ i ] ) );\n          }\n          if ( meta.getArgumentHeader()[ i ] ) {\n            data.header_parameters_nrs[ posHeader ] = fieldIndex;\n            data.headerParameters[ posHeader ] =\n              new BasicNameValuePair( environmentSubstitute( meta.getArgumentParameter()[ i ] ), data.outputRowMeta\n                .getString( r, data.header_parameters_nrs[ posHeader ] ) );\n            posHeader++;\n            if ( CONTENT_TYPE.equalsIgnoreCase( meta.getArgumentParameter()[ i ] ) ) {\n              data.contentTypeHeaderOverwrite = true; // Content-type will be overwritten\n            }\n          } else {\n            data.body_parameters_nrs[ posBody ] = fieldIndex;\n            data.bodyParameters[ posBody ] =\n              new BasicNameValuePair( environmentSubstitute( meta.getArgumentParameter()[ i ] ), data.outputRowMeta\n                .getString( r, data.body_parameters_nrs[ posBody ] ) );\n            posBody++;\n          }","sourceCodeStart":396,"sourceCodeEnd":432,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/httppost/HTTPPOST.java#L396-L432","documentation":"One of the configured argument (body/header parameter) field names is not present in the incoming stream. processRow throws a KettleStepException with 'HTTPPOST.Exception.CouldnotFindField' naming meta.getArgumentField()[i].","triggerScenarios":"processRow loops over nrargs argument entries; data.inputRowMeta.indexOfValue(meta.getArgumentField()[i]) returns -1 at line 414, throwing KettleStepException before processing rows.","commonSituations":"Field feeding a POST parameter was deleted or renamed upstream; a transformation was re-used with a different input layout; field name with surrounding whitespace; case mismatch between dialog and stream.","solutions":["Open the step dialog and pick existing fields from the dropdown for every argument row.","Restore the missing field upstream (add a Select values / renamed source column).","Check for leading/trailing spaces in the field name configured in the dialog.","Align the upstream step's output fields with what the HTTP POST step expects."],"exampleFix":"// before (dialog config)\nargumentField[0]=\"cust_id\"; // no longer in stream\n// after\nargumentField[0]=\"customer_id\"; // renamed field now used","handlingStrategy":"validation","validationCode":"RowMetaInterface in = transMeta.getPrevStepFields(stepName);\nfor (String f : meta.getArgumentField())\n  if (f != null && in.indexOfValue(f) < 0)\n    throw new KettleException(\"Argument field missing: \" + f);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep argument mappings in sync with upstream schema","Use dropdown selection for fields"],"tags":["pentaho","configuration","field-lookup","http-post"],"backgroundTag":"resource-not-found","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"}