aspose file tools*
The moose likes Security and the fly likes failed to retrieve attributes from weblogic embeded ldap Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "failed to retrieve attributes from weblogic embeded ldap" Watch "failed to retrieve attributes from weblogic embeded ldap" New topic
Author

failed to retrieve attributes from weblogic embeded ldap

Robert Strong
Ranch Hand

Joined: Sep 10, 2002
Posts: 84
hi, I'm using JNDI to retrieve attributes from weblogic8.1 embeded ldap.
my code is like below:

String userDN = "uid=bigrez,ou=people,ou=myrealm,dc=bigrezdomain";
DirContext dirCtx = null;
Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
ht.put(Context.PROVIDER_URL, "ldap://tiger:7001");
ht.put(Context.SECURITY_PRINCIPAL, userDN);
ht.put(Context.SECURITY_CREDENTIALS, "xxxx");
try{
dirCtx = new InitialDirContext(ht);
Attributes answer = dirCtx.getAttributes("uid=adminbigrez,ou=people,ou=myrealm,dc=bigrezdomain");
NamingEnumeration attrEnum = answer.getAll();
while(attrEnum.hasMore()){
Attribute attr = (Attribute)attrEnum.next();
String id = attr.getID();

}

but cannot retrieve any attributes from that entry, attrEnum always has no elements, while I'm pretty sure the DN="uid=adminbigrez,ou=people,ou=myrealm,dc=bigrezdomain" is correct.

could any one here help me out?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: failed to retrieve attributes from weblogic embeded ldap
 
Similar Threads
JNDI, LDAP, & Active Directory
JNDI - LDAP Woes
Get DistinguishedName of an LDAP entry given a uid
Changing LDAP "Search Attribute"
how to include LDAP updates and database access in one transaction?