To use an LDAP directory service with Derby, you need the following libraries in your classpath:
JNDI classes
LDAP provider from Sun
JNDI classes for a provider
Derby does not provide these libraries; they are available from Sun on the JNDI page. Use the 1.1.x versions of these libraries, not the 1.2.x versions. You might need to do two separate downloads to obtain all the required libraries.