directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Le Strat <dlest...@yahoo.com>
Subject DirContext Search Error
Date Fri, 04 Nov 2005 05:36:35 GMT
All,

I am working on integration apacheDS with Jetspeed 2. 
I can create entries fine, but I am running into issue
with the DirContext search.

I obtain the following context using pretty much the
default apacheds-server.xml

env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL,
"ldap://localhost:10389/");
env.put(Context.SECURITY_PRINCIPAL,
"uid=admin,ou=system");
env.put(Context.SECURITY_CREDENTIALS, rootPassword);
env.put(Context.SECURITY_AUTHENTICATION, "simple");
ctx = new InitialLdapContext(env, null);

As you can see the default setting uses
com.sun.jndi.ldap.LdapCtxFactory.

I want to run the following search context query:

SearchControls controls = new SearchControls(); 
controls.setSearchScope(SearchControls.SUBTREE_SCOPE);
controls.setReturningObjFlag(true);

NamingEnumeration searchResults = ((DirContext)
ctx).search("", "(&(uid=1269495866)
(objectclass=jetspeed-2-user))", controls );

When doing so, I get the following error:

org.apache.jetspeed.security.SecurityException:
javax.naming.NamingException: [LDAP: error code 36 -
failed on search operation]; remaining name ''

org.apache.jetspeed.security.SecurityException: Caused
by: javax.naming.NamingException: [LDAP: error code 36
- failed on search operation]; remaining name ''
	at
com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:2964)
	at
com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2934)
	at
com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2740)
	at
com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1811)
	at
com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1734)
	at
com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:368)
	at
com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:328)
	at
com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:313)
	at
javax.naming.directory.InitialDirContext.search(InitialDirContext.java:238)
	at
org.apache.jetspeed.security.spi.impl.ldap.AbstractLdapDao.searchByWildcardedUid(AbstractLdapDao.java:275)
	at
org.apache.jetspeed.security.spi.impl.ldap.AbstractLdapDao.lookupByUid(AbstractLdapDao.java:210)
	... 13 more


I would appreciate if anyone had any pointer on what I
am missing here.

Thank you.

Regards,

David Le Strat

________________________
David Le Strat
Blogging @ http://dlsthoughts.blogspot.com


		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

Mime
View raw message