[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
How can I add non-ascii dn entry to ldap with netscape ldap java sdk?
- To: openldap-software@OpenLDAP.org
- Subject: How can I add non-ascii dn entry to ldap with netscape ldap java sdk?
- From: james <ldapmaster@yahoo.com>
- Date: Tue, 9 Nov 2004 18:07:45 -0800 (PST)
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=oxh3lC3XVPTV3DugL4RXVU6kjm+LUF7GFxUXZT/wZMmexKqagisIjudOZp3r5GHEHI1cudY0h37/UoQxC5VdtBYXYp86B2a5AjBymw5hqMOIkkCGrfL+DwOJw1ObTqOjat2OcIKFi9uwlshj/AYYzEbG4Z2MilOPnCBMgLOG1HM= ;
I use netscape ldap java sdk 4.1, and I want to add non-ascii dn entry to ldap,
my code like this:
String dn = "uid=SOME_NON_ASCII_CHARACTERS,dc=company,dc=com";
base64DN = Base.encode(dn.getBytes("UTF8"));
set some entry attributes ...
LDAPEntry entry = new LDAPEntry(base64DN, attributeSets);
LDAPConnection.add(entry);
then I got this error msg:
netscape.ldap.LDAPException: error result (34); Invalid DN; Invalid DN syntax
at netscape.ldap.LDAPConnection.checkMsg(LDAPConnection.java:4852)
at netscape.ldap.LDAPConnection.add(LDAPConnection.java:2833)
at netscape.ldap.LDAPConnection.add(LDAPConnection.java:2848)
at netscape.ldap.LDAPConnection.add(LDAPConnection.java:2798)
What I'm wrong ? Can some one help me ?
Thanks you!
Do you Yahoo!?
Check out the new Yahoo! Front Page. www.yahoo.com