pentaho/pentaho-kettle · error · KettleException
LDAPConnection.Error.RetrievingFields
LDAPConnection.Error.RetrievingFields
Error message
LDAPConnection.Error.RetrievingFields
What it means
Thrown by the LDAPConnection constructor path in getFields(): any exception while deriving the output row fields from the first LDAP search results is wrapped in this KettleException. Note the cause is discarded (message-only), so the original error is not chained. It indicates field discovery from the directory failed.
Solutions
- Test connectivity to the LDAP host/port from the PDI server (telnet/openssl s_client).
- Correct the search base, filter, and bind credentials in the step dialog, then re-run 'Get Fields'.
- Because the cause is swallowed, temporarily enable JNDI debug or test the same query with ldapsearch to see the real error.
- Ensure the connection was opened before getFields() is invoked.
Defensive patterns
Strategy: validation
Validate before calling
// before invoking Get Fields
boolean reachable = testLdapConnectivity(host, port, user, password);
if (!reachable) throw new IllegalStateException("LDAP host unreachable; fix connection before field discovery"); Try / catch
try { fields = conn.getFields(); } catch (KettleException e) { logError("Field retrieval failed (cause is not chained): " + e.getMessage()); } Prevention
- Verify host/port/credentials before clicking 'Get Fields' in Spoon
- Diagnose with ldapsearch since this wrapper discards the cause
- Keep search base/filter minimal during field discovery
When it happens
Trigger: Calling getFields() (used when building step metadata, e.g. 'Get Fields' in Spoon) when the underlying getAttributes() search fails, attributes cannot be converted to ValueMeta, or the connection was never opened.
Common situations: Previewing/validating the LDAP Input step with a wrong host or credentials, directory unreachable at design time, or search base/filter configured but the directory returns nothing to derive fields from.
Related errors
- Annotation
- BaseStreamStepMeta.CheckResult.ResultStepMissing
- Cannot fetch driver metadata for
- CheckSum.Error.UnknownEvaluationMethod
- Clone not supported for
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/a17661f353dcec84.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/ldap/impl/src/main/java/org/pentaho/di/trans/steps/ldapinput/LDAPConnection.java:730
//
if ( IsDate( attributeValue ) ) {
valueType = ValueMetaInterface.TYPE_DATE;
} else if ( IsInteger( attributeValue ) ) {
valueType = ValueMetaInterface.TYPE_INTEGER;
} else if ( IsNumber( attributeValue ) ) {
valueType = ValueMetaInterface.TYPE_NUMBER;
} else {
valueType = ValueMetaInterface.TYPE_STRING;
}
ValueMetaInterface value = ValueMetaFactory.createValueMeta( fieldName, valueType );
fields.addValueMeta( value );
}
}
}
return fields;
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString( PKG, "LDAPConnection.Error.RetrievingFields" ) );
} finally {
fieldsl = null;
}
}
private boolean IsNumber( String str ) {
try {
Float.parseFloat( str );
} catch ( Exception e ) {
return false;
}
return true;
}
private boolean IsDate( String str ) {
// TODO: What about other dates? Maybe something for a CRQ
try {
SimpleDateFormat fdate = new SimpleDateFormat( "yy-mm-dd" );View on GitHub (pinned to f3058517a1)