javax.naming.ServiceUnavailableException when using JNDI to access LDAP
Posted on 2007-03-30
Using a InitialDirContext object, searching Active Directory fails. Specifically I'm using the .search method and the error occurs when executing the NamingEnumeration.hasMore method.
The error is that a javax.naming.PartialResultException is throw reporting that the root cause was a
javax.naming.ServiceUnavailableException: testdomain.net:389; socket closed.
I've verified that the environment I'm using to establish the InitialDirContext is correct (user,pass,url).
Also verified that the LDAP query I'm passing the search method is valid and returns results (execute ldapsearch from command-line).
What could be causing my socket connection to close?