pentaho/pentaho-kettle · error · KettleException
LDAPConnection.Exception.GettingAttributes
LDAPConnection.Exception.GettingAttributes
Error message
LDAPConnection.Exception.GettingAttributes
What it means
Thrown by LDAPConnection.getAttributes() while iterating a SearchResult: fetching the entry's Attributes, or putting the 'dn' value via getNameInNamespace(), failed. It wraps any javax.naming exception raised while materializing a single search result entry. The original naming exception is attached as cause.
Solutions
- Read the chained cause to identify the exact javax.naming exception (e.g. NameNotFoundException, CommunicationException).
- Re-run the transformation; transient directory state (entry deleted mid-read) resolves on retry.
- Check referral handling settings ('follow' vs 'ignore') in the LDAP connection options.
- Verify the search base and returned entries use valid, fully-qualified DNs.
Defensive patterns
Strategy: try-catch
Try / catch
try { attrs = conn.getAttributes(); } catch (KettleException e) { Throwable cause = e.getCause(); logError("Entry read failed due to " + cause.getMessage(), cause); } Prevention
- Configure referral handling explicitly ('follow' only when referrals are reachable)
- Avoid deleting/renaming entries while a read is iterating
- Use stable, fully-qualified DNs in the directory
When it happens
Trigger: getSearchResult().next() or searchResult.getAttributes() / getNameInNamespace() throws NamingException during per-row attribute extraction, typically after a successful search (e.g. entry was deleted between paging reads, or referral/name resolution failed).
Common situations: Directory entry removed concurrently mid-iteration, referral chasing to an unreachable server, or invalid DN characters that break getNameInNamespace().
Related errors
- Field [ ] couldn't be found in the input stream!
- KettleTrustManager.Exception.CouldNotInitializeKettleTrustManager
- KettleTrustManager.Exception.CouldNotCreateCertStore
- KettleTrustManager.Exception.CouldNotInitializeTrustManager
- KettleTrustManager.Exception.CouldNotOpenCertStore
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/3e2ecec67b49cc74.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/ldap/impl/src/main/java/org/pentaho/di/trans/steps/ldapinput/LDAPConnection.java:597
}
while ( !getSearchResult().hasMoreElements() ) {
return null;
}
} else {
// User do not want to use paging
// we have already returned all the result
return null;
}
}
try {
SearchResult searchResult = getSearchResult().next();
Attributes results = searchResult.getAttributes();
results.put( "dn", searchResult.getNameInNamespace() );
return results;
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString( PKG, "LDAPConnection.Exception.GettingAttributes" ), e );
}
}
private InitialLdapContext getInitialContext() {
return protocol.getCtx();
}
private SearchControls getSearchControls() {
return this.controls;
}
private NamingEnumeration<SearchResult> getSearchResult() {
return this.results;
}
/**
* Remove CR and LF from filter string
*View on GitHub (pinned to f3058517a1)