Chandan,
Reasearching this issue I came across this write up for the settings of the connection
javax.naming.Context.SECURITY_AUTHENTICATION
the type of authentication to use when connecting to the LDAP directory server. This value is either none, simple, or strong.
javax.naming.Context.SECURITY_PRINCIPAL
the name, such as the distinguished name of a person object in the directory, under which the connection to the LDAP directory server should be made. This property is not required if the value for javax.naming.Context.SECURITY_AUTHENTICATION is none.
javax.naming.Context.SECURITY_CREDENTIALS
the credentials, such as a password, corresponding to the principal given as the value of javax.naming.Context.SECURITY_PRINCIPAL. This property is not required if the value for javax.naming.Context.SECURITY_AUTHENTICATION is none.
have you tried to turn CA directory in the dev environment as anonymous?
With anon set on CA dir you can change your java to be:
Hashtable<String, String> env = new Hashtable<String, String>(11);
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.REFERRAL, "follow");
String providerUrl = "ldap://ip:10389";
env.put(Context.PROVIDER_URL, providerUrl);
env.put(Context.SECURITY_AUTHENTICATION, "none");
env.put(Context.SECURITY_PRINCIPAL, "");
env.put(Context.SECURITY_CREDENTIALS, "");
Context context = new InitialContext(env);
Compile and test with anonymous access in dev, then you know everything in your code works except the userid/password
After this I would check what the actual dn of the user is.
This is the DN of an ou called users, and is probably invalid because you do not have an ou called cspadmin
ou=users,cn=cspadmin,dc=unitechwireless,dc=com
This is incorrect because it is not a complete dn:
cn=cspadmin
This may be correct because it looks like a complete dn, but users usually do not exist at the base of an OU
cn=cspadmin,dc=unitechwireless,dc=com
Thanks,
Bill Patton