When using spring-ldap - if you get a NoClassDefFoundError for com.sun.jndi.ldap.ctl.ResponseControlFactory then you need the ldap booster pack (currently 1.0).
LDAP authentication started giving:
(9)Bad file descriptor: Could not open password file: (null)