JNDI and JDK1.4.1 (Linux AND Windows)
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Thursday, September 26, 2002 05:55 AM

Well I have a serious problem with my JNDI code under JDK1.4.1 : Every time I try to do a search on the InitialDirContext, it responds by : javax.naming.InvalidNameException: ou=test: [LDAP: error code 34 - invalid DN]; remaining name 'ou=test' The funny thing is that it was working perfectly under JDK1.3 and JDK1.4.0 ... For information, here is a small part of the JNDI code : ... env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL, "ldap://"+p_host+":389/"+m_basedn); env.put(Context.SECURITY_PRINCIPAL, p_manager);   More>>


Well I have a serious problem with my JNDI code under JDK1.4.1 :



Every time I try to do a search on the InitialDirContext, it responds by :



javax.naming.InvalidNameException: ou=test: [LDAP: error code 34 - invalid DN]; remaining name 'ou=test'



The funny thing is that it was working perfectly under JDK1.3 and JDK1.4.0 ...



For information, here is a small part of the JNDI code :



...

env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");

env.put(Context.PROVIDER_URL, "ldap://"+p_host+":389/"+m_basedn);
env.put(Context.SECURITY_PRINCIPAL, p_manager);

env.put(Context.SECURITY_CREDENTIALS, p_pwd);

DirContext m_ctx = new InitialDirContext(env);



SearchControls ctls = new SearchControls();

ctls.setReturningObjFlag (true);

ctls.setSearchScope(SearchControls.ONELEVEL_SCOPE);

NamingEnumeration answer = m_ctx.search("ou=test", "(objectclass=organizationalUnit)", ctls);

-> Exception !!!



Pleaseeeeeeeeeeee heelppppppppppppppp :-)





Laurent.

   <<Less

Re: JNDI and JDK1.4.1 (Linux AND Windows)

Posted By:   Sylvain_PEREIRA  
Posted On:   Wednesday, November 6, 2002 08:06 AM

Tip 1: did you take a look at the LDAP server access logs
(see any difference between 1.4.0 and 1.4.1) ?



Tip2: I know it's a bit strong, but is there any way you
can sniff the LDAP request over the network and may be compare with jdk1.4.1.




Sylvain.
About | Sitemap | Contact