Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Possible reasons for LDAP: error code 34 ?

Status
Not open for further replies.

nishantv

IS-IT--Management
Apr 19, 2005
1
IN
Hi.
I am using iPlanet Ldap Server.
I have created a dn: cn=usa,o=eidea on the server.
I am trying to use this namespace in my client.
Here is a snippet of the code:
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://ganymede.eidea.com:400/cn=directory manager,o=eidea,c=usa");
DirContext ctx = new InitialDirContext(env);
ctx.bind(objectName, object);
....
I get an exception on the last statement above:
javax.naming.InvalidNameException: testName: [LDAP: error code 34 - failed to add RDN values]; remaining name 'testName'
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2593)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2411)
at com.sun.jndi.ldap.LdapCtx.c_bind(LdapCtx.java:301)
at com.sun.jndi.ldap.LdapCtx.c_bind(LdapCtx.java:260)
at com.sun.jndi.toolkit.ctx.ComponentContext.p_bind(ComponentContext
a:595)
at com.sun.jndi.toolkit.ctx.PartialCompositeContext.bind(PartialCompeContext.java:182)
at com.sun.jndi.toolkit.ctx.PartialCompositeContext.bind(PartialCompeContext.java:172)
at javax.naming.InitialContext.bind(InitialContext.java:358)
..................

The help says that error code:34 means Invalid DN syntax. I am unable to overcome this error.
Is my DN syntax wrong. If yes, what should it be? Or is there some other reason for the exception.
Please help?
thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top