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.
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.