File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Security and the fly likes LDAP on websphere app server 7 problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Security
Bookmark "LDAP on websphere app server 7 problem" Watch "LDAP on websphere app server 7 problem" New topic
Author

LDAP on websphere app server 7 problem

Murad Iqbaal
Greenhorn

Joined: Feb 02, 2012
Posts: 9



I am facing a problem with an LDAP operation. I want to dynamically add a member to an LDAP group when selected by the user from GUI / browser. I paste the code below which works perfectly well when I run it in a Test class (using com.sun.jndi.ldap.LdapCtxFactory) . But, when I package it in my build, deploy on websphere app server 7.0 (using com.ibm.websphere.naming.WsnInitialContextFactory), and invoke this method according to user's selection, then I get the error below. I wonder what's wrong I am doing. Doesn't WAS provide implementation of ldap connection factory? I also tried deploying on WAS with the sun's ldap which otherwise works on the Test class, but I am getting the same exception as below. I'd appreciate if anybody can give a clue. Thanks.




Problem adding member: javax.naming.OperationNotSupportedException: [LDAP: error code 53 - 00000561: SvcErr: DSID-031A120C, problem 5003 (WILL_NOT_PERFORM), data 0










Problem adding member: javax.naming.OperationNotSupportedException: [LDAP: error code 53 - 00000561: SvcErr: DSID-031A120C, problem 5003 (WILL_NOT_PERFORM), data 0

Murad Iqbaal
Greenhorn

Joined: Feb 02, 2012
Posts: 9


Anyone? Haven't yet managed to solve this. Would appreciate any help.
Murad Iqbaal
Greenhorn

Joined: Feb 02, 2012
Posts: 9


I got it solved. Posting solution here, hope this helps someone.

1. Use the standard JNDI context of sun, not websphere.
2. Additional properties i was missing in the hashtable, once i added them, it worked like a charm.




Works fine now.

Thank you all for looking.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: LDAP on websphere app server 7 problem