I'm a newcomer to LDAP trying to assemble what should be a very simple tool: 
take a user name, attempt to connect to an Active Directory server and bind on 
UID only, so that it pops a password dialog, so that I can authenticate the 
user of a particular application. I don't need anything more advanced than "is 
this a valid DN, and if it is can you ask them for a password and let me know 
if it's valid?"

My code, trivial as it is, is failing to even launch, because LdifAnonymizer 
throws an exception that there's "No file to anonymize." Poking through the 
source, ldap.client.api.LdifAnonymizer appears to do this when launched as a 
standalone application without a file being passed in as a parameter. But I'm 
not trying to launch anything, so I'm not sure what is, or why. I have the 
following libraries added to Eclipse as "Referenced libraries:"

                api-asn1-api-2.0.0.AM2.jar
                api-asn1-ber-2.0.0.AM2.jar
                api-ldap-client-api-2.0.0.AM2.jar
                api-ldap-codec-core-2.0.0.AM2.jar
                api-ldap-model-2.0.0.AM2.jar
                mina-core-2.0.18.jar
                slf4j-api-1.7.25.jar

This is the minimum set of libraries necessary to resolve all dependencies 
generated by api-ldap-client-api-2.0.0.AM2.jar. I haven't touched any 
configuration files. Everything's as it was downloaded. I'm obviously doing 
something wrong, but from both the "Five Minutes[sic] Tutorial" (should be 
"Minute," singular-English is funny that way) and what I can find in the User 
Manual, the client should act like a client, not attempt to install or run any 
services. Yet the User Manual only mentions Ldif in terms of adding records to 
a DS server, and I have no interest at all in doing that. I just want to 
connect and bind to a remote AD server, get my yes/no authentication result, 
and unbind.

Am I using the wrong tool? Missing something obvious? I'm at my wit's end here. 
I'd provide code, but this error happens even if I comment out the import 
directive that brings in 
org.apache.directory.ldap.client.api.LdapNetworkConnection. It appears to be 
enough to link the JAR, and I get the error.

Thanks,

--
James Robinson, Application Developer
State Health Registry of Iowa
2600 UCC | [email protected]<mailto:[email protected]> | (319) 
335-6619


Reply via email to