pentaho/pentaho-kettle · error · KettleException
LDAPInput.Exception.ErrorPaging
LDAPInput.Exception.ErrorPaging
Error message
LDAPInput.Exception.ErrorPaging
What it means
LDAPConnection.getAttributes() wraps the LDAP search execution (InitialLdapContext.search with search base, filter and SearchControls) in a KettleException when paging-based search setup fails. It means the directory search itself could not be performed, e.g. bad search base DN, invalid filter syntax, or directory connection/protocol errors. The underlying LDAP exception is preserved as the cause.
Solutions
- Verify the search base DN exists in the directory (test with ldapsearch -b <base>).
- Validate the LDAP filter syntax; a filter must be fully parenthesized, e.g. (objectClass=person).
- Confirm the bind user/password and protocol settings (SSL port vs plain) in the LDAP Input step.
- Inspect the chained cause exception (e) for the precise javax.naming error code.
Example fix
// before
setFilter("(objectClass");
// after
setFilter("(objectClass=inetOrgPerson)"); Defensive patterns
Strategy: try-catch
Validate before calling
// before running the step
if (searchBase == null || !searchBase.contains("=")) throw new IllegalArgumentException("Invalid search base DN: " + searchBase);
if (filter != null && !filter.startsWith("(") ) throw new IllegalArgumentException("LDAP filter must be parenthesized: " + filter); Try / catch
try { results = conn.getAttributes(); } catch (KettleException e) { logError("LDAP search failed: " + e.getCause().getMessage(), e); throw e; } Prevention
- Test search base and filter with ldapsearch before configuring the step
- Always fully parenthesize LDAP filters
- Validate bind credentials with a simple anonymous or authenticated bind test
When it happens
Trigger: Calling getAttributes() (typically via getFields()) when the connection uses paging and getInitialContext().search(searchBase, filter, searchControls) throws; also returned as null when no search result elements exist.
Common situations: Typo in the search base DN (e.g. missing 'dc=' component), malformed LDAP filter like '(objectClass' (unbalanced parenthesis), anonymous bind on a directory that forbids it, or the base DN not existing in the directory.
Related errors
- LDAPConnection.Error.Search
- An error occurred sending a slave transformation:
- An error occurred sending the master transformation:
- Cannot load WSDL file: + _wsdlName
- Carte.Error.NoServerFound
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/1915d5bff22d671a.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/ldap/impl/src/main/java/org/pentaho/di/trans/steps/ldapinput/LDAPConnection.java:578
// pass the cookie back for the next page
if ( isSortingAttributes() ) {
getInitialContext().setRequestControls(
new Control[] {
new SortControl( getSortingAttributesKeys(), Control.NONCRITICAL ),
new PagedResultsControl( GetPagingSize(), cookie, Control.CRITICAL ) } );
} else {
getInitialContext().setRequestControls(
new Control[] { new PagedResultsControl( GetPagingSize(), cookie, Control.CRITICAL ) } );
}
if ( ( cookie != null ) && ( cookie.length != 0 ) ) {
// get search result for the page
this.results = getInitialContext().search( getSearchBase(), getFilter(), getSearchControls() );
} else {
return null;
}
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString( PKG, "LDAPInput.Exception.ErrorPaging" ), e );
}
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 ) {View on GitHub (pinned to f3058517a1)