Filter Search problem using JNDI and Sun's LDAP service provider.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Bartee_Natarajan
Posted On:   Wednesday, August 22, 2001 02:34 PM

I have configured two LDAP databases. One with a suffix: dc=artesia and the other with the suffix: vn=Geography, dc=artesia. Both of them have their own relevant entries. I create a JNDI DirContext with the provider URL: ldap://localhost:389/vn=Geography, dc=artesia This directly binds to my top entry in the second LDAP database. I wish to search for entries matching a filter from this root entry. So my request is as follows: SearchControl sc = ...; NamingEnumeration ne = ctx.search("", filter, sc); Notice the empty string as the 'name of the object to search from'. Since I wish to search the whole tree in this context, I specify an empty string. But th   More>>

I have configured two LDAP databases. One with a suffix: dc=artesia and the other with the suffix: vn=Geography, dc=artesia. Both of them have their own relevant entries.
I create a JNDI DirContext with the provider URL:

ldap://localhost:389/vn=Geography, dc=artesia


This directly binds to my top entry in the second LDAP database. I wish to search for entries matching a filter from this root entry. So my request is as follows:


			
SearchControl sc = ...;
NamingEnumeration ne = ctx.search("", filter, sc);


Notice the empty string as the 'name of the object to search from'. Since I wish to search the whole tree in this context, I specify an empty string. But this search returns the following exception:


			
java.naming.NameNotFoundException: ''


But if I merge all entries into a single LDAP database, my JNDI search works perfectly. What am I doing wrong? Or is this a bug in the LDAP JNDI service provider from Sun that is packaged with JDK 1.3. (Context factory: com.sun.jndi.ldap.LdapCtxFactory)?


Any suggestions would be helpful.

I am running on JDK 1.3, OpenLDAP version 2.0.11 on Windows 2000.

Thanks.

   <<Less
About | Sitemap | Contact