{"record":{"id":"bf0797242212e02f","repo":"pentaho/pentaho-kettle","slug":"field-0-couldn-t-be-found-in-the-input-stream","errorCode":null,"errorMessage":"Field [{0}] couldn't be found in the input stream!","messagePattern":"Field \\[(.+?)\\] couldn't be found in the input stream!","errorType":"validation","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/ldap/impl/src/main/java/org/pentaho/di/trans/steps/ldapoutput/LDAPOutput.java","lineNumber":89,"sourceCode":"          throw new KettleException( BaseMessages.getString(\n            PKG, \"LDAPOutputUpdateDialog.FieldsMissing.DialogMessage\" ) );\n        }\n\n        // Take care of variable\n        data.fieldsAttribute = new String[data.nrfields];\n        // Build the mapping of input position to field name\n        data.fieldStream = new int[data.nrfields];\n\n        // Fields to update\n        List<Integer> fieldsToUpdateInStreaml = new ArrayList<Integer>();\n        List<String> fieldsToUpdateAttributel = new ArrayList<String>();\n\n        for ( int i = 0; i < data.nrfields; i++ ) {\n\n          data.fieldStream[i] =\n            getInputRowMeta().indexOfValue( environmentSubstitute( meta.getUpdateStream()[i] ) );\n          if ( data.fieldStream[i] < 0 ) {\n            throw new KettleException( \"Field [\"\n              + meta.getUpdateStream()[i] + \"] couldn't be found in the input stream!\" );\n          }\n          data.fieldsAttribute[i] = environmentSubstitute( meta.getUpdateLookup()[i] );\n\n          if ( meta.getOperationType() == LDAPOutputMeta.OPERATION_TYPE_UPSERT ) {\n            if ( meta.getUpdate()[i].booleanValue() ) {\n              // We need also to keep care of the fields to update\n              fieldsToUpdateInStreaml.add( data.fieldStream[i] );\n              fieldsToUpdateAttributel.add( data.fieldsAttribute[i] );\n            }\n          }\n        }\n\n        data.nrfieldsToUpdate = fieldsToUpdateInStreaml.size();\n        if ( data.nrfieldsToUpdate > 0 ) {\n          data.fieldStreamToUpdate = new int[data.nrfieldsToUpdate];\n          data.fieldsAttributeToUpdate = new String[data.nrfieldsToUpdate];\n          for ( int i = 0; i < fieldsToUpdateInStreaml.size(); i++ ) {","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/ldap/impl/src/main/java/org/pentaho/di/trans/steps/ldapoutput/LDAPOutput.java#L71-L107","documentation":"Thrown in LDAPOutput.processRows when a field configured in the update stream mapping does not exist in the incoming row metadata — getInputRowMeta().indexOfValue(...) returns -1. The step builds the mapping of input positions to fields and aborts when a configured stream field is absent from the actual input rows.","triggerScenarios":"A name in meta.getUpdateStream()[i] (after variable substitution) does not match any field of the input row: indexOfValue returns < 0 and the exception is thrown listing the missing field.","commonSituations":"Upstream step was renamed or removed a field; typo in the field name; field is generated conditionally so some rows lack it (metadata says it never exists); transformation moved between environments where variables resolve differently.","solutions":["Fix the field name in the LDAP Output dialog's stream-field column to exactly match an upstream field (case-sensitive)","Inspect the row structure with 'Get Fields' in the dialog to refresh names from the input step","Add/repair the upstream step that should produce the missing field","If the field name uses variables, verify the variable resolves to the actual field name at runtime"],"exampleFix":"// before\nStream field: FirstName  (upstream produces 'firstname')\n// after\nStream field: firstname","handlingStrategy":"validation","validationCode":"// Verify configured stream fields exist in the input row metadata before running\nRowMetaInterface in = transMeta.getPrevStepFields(stepMeta);\nfor (String f : ((LDAPOutputMeta) stepMeta.getStepMetaInterface()).getUpdateStream()) {\n  if (in.indexOfValue(f) < 0) {\n    throw new IllegalStateException(\"Field [\" + f + \"] missing from upstream output\");\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  runTransformation();\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"couldn't be found in the input stream\")) {\n    String field = e.getMessage().replaceAll(\".*Field \\\\[(.+?)\\\\].*\", \"$1\");\n    throw new IllegalStateException(\"Fix LDAP Output mapping: upstream has no field \" + field);\n  }\n  throw e;\n}","preventionTips":["Re-run 'Get Fields' after changing upstream steps","Keep field names exact (case-sensitive)","Refresh mappings whenever upstream field names change","Verify variables in field names resolve in the target environment"],"tags":["ldap","mapping","field-resolution"],"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"}