pentaho/pentaho-kettle · error · KettleException
LDAPOutput.Error.OldDNFieldMissing
LDAPOutput.Error.OldDNFieldMissing
Error message
LDAPOutput.Error.OldDNFieldMissing
What it means
Thrown in LDAPOutput.processRows when the operation type is RENAME but the configured 'Old DN' field name is empty (after environment substitution). Renaming an LDAP entry requires knowing the entry's current DN from an input field; without it the rename cannot be performed.
Solutions
- Open the LDAP Output dialog (Rename operation) and set the 'Old DN field name' to an incoming field containing the current DN
- Also set the 'New DN field name' (the same check throws NewDNFieldMissing next)
- Verify any variable used in these settings resolves at runtime
- Ensure the upstream step actually emits a field with that name containing valid DNs
Example fix
// before Operation: Rename entry, Old DN field: (empty) // after Operation: Rename entry, Old DN field: old_dn, New DN field: new_dn
Defensive patterns
Strategy: validation
Validate before calling
// Validate rename settings before execution
LDAPOutputMeta meta = (LDAPOutputMeta) stepMeta.getStepMetaInterface();
if (meta.getOperationType() == LDAPOutputMeta.OPERATION_TYPE_RENAME) {
if (meta.getOldDnFieldName() == null || meta.getOldDnFieldName().isEmpty()) {
throw new IllegalStateException("Rename requires an Old DN field name");
}
if (meta.getNewDnFieldName() == null || meta.getNewDnFieldName().isEmpty()) {
throw new IllegalStateException("Rename requires a New DN field name");
}
} Try / catch
try {
runTransformation();
} catch (KettleException e) {
if (e.getMessage().contains("OldDNFieldMissing") || e.getMessage().contains("NewDNFieldMissing")) {
throw new IllegalStateException("Set Old DN / New DN field names in the LDAP Output rename settings");
}
throw e;
} Prevention
- Whenever switching the operation to Rename, fill both DN field names immediately
- Confirm variables used for these settings are defined per environment
- Ensure the upstream step emits fields containing valid current/new DNs
When it happens
Trigger: meta.getOperationType() == OPERATION_TYPE_RENAME and Utils.isEmpty(environmentSubstitute(meta.getOldDnFieldName())) — the Old DN field was never set, or its variable resolved to empty.
Common situations: User switched the operation to 'Rename entry' but forgot to fill the Old DN / New DN field names; a variable holding the field name is undefined in the target environment; transformation copied with settings cleared.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- LDAPConnection.Error.Renaming
- LDAPInput.Error.DynamicFilterFieldMissing
- LDAPInput.Error.DynamicSearchFieldMissing
- LDAPOutput.Error.DNFieldMissing
- LDAPOutput.Error.NewDNFieldMissing
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/556733550ba5d792.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/ldap/impl/src/main/java/org/pentaho/di/trans/steps/ldapoutput/LDAPOutput.java:124
data.fieldsAttributeToUpdate = new String[data.nrfieldsToUpdate];
for ( int i = 0; i < fieldsToUpdateInStreaml.size(); i++ ) {
data.fieldStreamToUpdate[i] = fieldsToUpdateInStreaml.get( i );
data.fieldsAttributeToUpdate[i] = fieldsToUpdateAttributel.get( i );
}
}
fieldsToUpdateInStreaml = null;
fieldsToUpdateAttributel = null;
data.attributes = new String[data.nrfields];
if ( meta.getOperationType() == LDAPOutputMeta.OPERATION_TYPE_UPSERT && data.nrfieldsToUpdate > 0 ) {
data.attributesToUpdate = new String[data.nrfieldsToUpdate];
}
}
if ( meta.getOperationType() == LDAPOutputMeta.OPERATION_TYPE_RENAME ) {
String oldDnField = environmentSubstitute( meta.getOldDnFieldName() );
if ( Utils.isEmpty( oldDnField ) ) {
throw new KettleException( BaseMessages.getString( PKG, "LDAPOutput.Error.OldDNFieldMissing" ) );
}
String newDnField = environmentSubstitute( meta.getNewDnFieldName() );
if ( Utils.isEmpty( newDnField ) ) {
throw new KettleException( BaseMessages.getString( PKG, "LDAPOutput.Error.NewDNFieldMissing" ) );
}
// return the index of the field in the input stream
data.indexOfOldDNField = getInputRowMeta().indexOfValue( oldDnField );
if ( data.indexOfOldDNField < 0 ) {
// the field is unreachable!
throw new KettleException( BaseMessages.getString( PKG, "LDAPOutput.Error.CanNotFindField", oldDnField ) );
}
// return the index of the field in the input stream
data.indexOfNewDNField = getInputRowMeta().indexOfValue( newDnField );
if ( data.indexOfNewDNField < 0 ) {View on GitHub (pinned to f3058517a1)