{"record":{"id":"c56315b42e2e81df","repo":"pentaho/pentaho-kettle","slug":"ldapoutput-error-newdnfieldmissing","errorCode":"LDAPOutput.Error.NewDNFieldMissing","errorMessage":"LDAPOutput.Error.NewDNFieldMissing","messagePattern":"LDAPOutput\\.Error\\.NewDNFieldMissing","errorType":"validation","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/ldap/impl/src/main/java/org/pentaho/di/trans/steps/ldapoutput/LDAPOutput.java","lineNumber":129,"sourceCode":"        }\n        fieldsToUpdateInStreaml = null;\n        fieldsToUpdateAttributel = null;\n\n        data.attributes = new String[data.nrfields];\n        if ( meta.getOperationType() == LDAPOutputMeta.OPERATION_TYPE_UPSERT && data.nrfieldsToUpdate > 0 ) {\n          data.attributesToUpdate = new String[data.nrfieldsToUpdate];\n        }\n      }\n\n      if ( meta.getOperationType() == LDAPOutputMeta.OPERATION_TYPE_RENAME ) {\n        String oldDnField = environmentSubstitute( meta.getOldDnFieldName() );\n        if ( Utils.isEmpty( oldDnField ) ) {\n          throw new KettleException( BaseMessages.getString( PKG, \"LDAPOutput.Error.OldDNFieldMissing\" ) );\n        }\n\n        String newDnField = environmentSubstitute( meta.getNewDnFieldName() );\n        if ( Utils.isEmpty( newDnField ) ) {\n          throw new KettleException( BaseMessages.getString( PKG, \"LDAPOutput.Error.NewDNFieldMissing\" ) );\n        }\n\n        // return the index of the field in the input stream\n        data.indexOfOldDNField = getInputRowMeta().indexOfValue( oldDnField );\n\n        if ( data.indexOfOldDNField < 0 ) {\n          // the field is unreachable!\n          throw new KettleException( BaseMessages.getString( PKG, \"LDAPOutput.Error.CanNotFindField\", oldDnField ) );\n        }\n        // return the index of the field in the input stream\n        data.indexOfNewDNField = getInputRowMeta().indexOfValue( newDnField );\n\n        if ( data.indexOfNewDNField < 0 ) {\n          // the field is unreachable!\n          throw new KettleException( BaseMessages.getString( PKG, \"LDAPOutput.Error.CanNotFindField\", newDnField ) );\n        }\n\n      } else {","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/ldap/impl/src/main/java/org/pentaho/di/trans/steps/ldapoutput/LDAPOutput.java#L111-L147","documentation":"LDAPOutput throws this when the transformation is in UPDATE/INSERT-or-UPDATE (rename DN) mode and the configured 'New DN field' name is empty after variable substitution. The step needs a stream field holding the new distinguished name to perform the rename, so it aborts processRow with a KettleException.","triggerScenarios":"Running the LDAP Output step with operation type that renames entries (Update or Upsert/rename) while meta.getNewDnFieldName() is unset or resolves to an empty string after environmentSubstitute.","commonSituations":"Step misconfigured in the GUI (New DN field dropdown left blank); a variable like ${NEW_DN_FIELD} used in the field name is not defined at runtime so it substitutes to empty; transformation copied between environments where the variable is missing.","solutions":["Open the LDAP Output step dialog and set the 'New DN field' to a field present in the incoming stream","Define the variable used in the New DN field name (e.g. in kettle.properties or via Set Variables step) so substitution yields a non-empty value","If renames are not intended, switch the step's operation to Insert or Update-only mode which does not require a New DN field"],"exampleFix":"// before (transformation XML snippet)\n<new_dn_field/>\n// after\n<new_dn_field>newDn</new_dn_field>","handlingStrategy":"validation","validationCode":"String newDnField = environmentSubstitute(meta.getNewDnFieldName());\nif (Utils.isEmpty(newDnField)) {\n  throw new KettleException(\"New DN field must be set for rename operations\");\n}","typeGuard":null,"tryCatchPattern":"try { transform.processRow(meta, data); } catch (KettleException e) {\n  if (e.getMessage().contains(\"NewDNFieldMissing\")) { logError(\"Configure the New DN field in the LDAP Output step\"); }\n  throw e;\n}","preventionTips":["Always fill New DN field when using Update/Upsert mode","Avoid undefined variables in field names; define them in kettle.properties","Preview the input stream before running to confirm fields exist"],"tags":["ldap","configuration","missing-field"],"backgroundTag":"missing-required-config-field","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"}