{"record":{"id":"4898e1f8e61e656a","repo":"pentaho/pentaho-kettle","slug":"execprocess-exception-couldnotfindfield","errorCode":null,"errorMessage":"ExecProcess.Exception.CouldnotFindField","messagePattern":"ExecProcess\\.Exception\\.CouldnotFindField","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/execprocess/ExecProcess.java","lineNumber":90,"sourceCode":"      data.NrPrevFields = data.previousRowMeta.size();\n      data.outputRowMeta = data.previousRowMeta;\n      meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,\n        metaStore );\n\n      // Check is process field is provided\n      if ( Utils.isEmpty( meta.getProcessField() ) ) {\n        logError( BaseMessages.getString( PKG, \"ExecProcess.Error.ProcessFieldMissing\" ) );\n        throw new KettleException( BaseMessages.getString( PKG, \"ExecProcess.Error.ProcessFieldMissing\" ) );\n      }\n\n      // cache the position of the field\n      if ( data.indexOfProcess < 0 ) {\n        data.indexOfProcess = data.previousRowMeta.indexOfValue( meta.getProcessField() );\n        if ( data.indexOfProcess < 0 ) {\n          // The field is unreachable !\n          logError( BaseMessages.getString( PKG, \"ExecProcess.Exception.CouldnotFindField\" )\n            + \"[\" + meta.getProcessField() + \"]\" );\n          throw new KettleException( BaseMessages.getString( PKG, \"ExecProcess.Exception.CouldnotFindField\", meta\n            .getProcessField() ) );\n        }\n      }\n      if ( meta.isArgumentsInFields() ) {\n        if ( data.indexOfArguments == null ) {\n          data.indexOfArguments = new int[meta.getArgumentFieldNames().length];\n          for ( int i = 0; i < data.indexOfArguments.length; i++ ) {\n            String fieldName = meta.getArgumentFieldNames()[i];\n            data.indexOfArguments[i] = data.previousRowMeta.indexOfValue( fieldName );\n            if ( data.indexOfArguments[i] < 0 ) {\n              logError( BaseMessages.getString( PKG, \"ExecProcess.Exception.CouldnotFindField\" )\n                + \"[\" + fieldName + \"]\" );\n              throw new KettleException(\n                BaseMessages.getString( PKG, \"ExecProcess.Exception.CouldnotFindField\", fieldName ) );\n            }\n          }\n        }\n      }","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/execprocess/ExecProcess.java#L72-L108","documentation":"Message key ExecProcess.Exception.CouldnotFindField thrown in ExecProcess.processRow: the configured process field name was not found in the incoming row (indexOfValue returned a negative index for the resolved field name, which is interpolated into the localized message).","triggerScenarios":"processRow on first row: meta.getProcessField() is non-empty but data.previousRowMeta.indexOfValue(field) returns -1, i.e. the upstream row metadata contains no field with that exact name.","commonSituations":"Upstream field renamed or case mismatch; the field-producing step was removed or reordered; spec changed to 'include all fields' variants that drop the field; copy/paste between transformations with different layouts.","solutions":["Verify the field exists in the incoming stream (use 'Preview' / 'Show input fields') and correct the 'Process field' name in the step dialog.","Fix case-sensitivity — field names in Kettle are case-sensitive.","Reconnect or add the upstream step that produces the field.","Use a Select Values / Add constants step to (re)introduce the field before ExecProcess."],"exampleFix":"// before: field 'cmd' no longer on the stream\nmeta.setProcessField(\"cmd\");\n// after: match the actual upstream field name\nmeta.setProcessField(\"command\"); // or add a Select Values step aliasing cmd -> command","handlingStrategy":"validation","validationCode":"// before running: confirm the field is on the stream\nRowMetaInterface prev = transMeta.getPrevStepFields(stepMeta);\nif (prev.indexOfValue(meta.getProcessField()) < 0) {\n  throw new IllegalStateException(\"Field missing upstream: \" + meta.getProcessField());\n}","typeGuard":null,"tryCatchPattern":"try { trans.execute(); } catch (KettleException e) { if (e.getMessage().contains(\"CouldnotFindField\")) { /* re-map field name */ } }","preventionTips":["Preview rows before the step to verify field names","Remember field names are case-sensitive","Use Select Values to alias renamed fields"],"tags":["kettle","field-lookup","row-metadata","execprocess"],"backgroundTag":"record-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"}