Hi all,I have a entry whose alias attribute already has 'aaaa' and 'bbbb' value.
and now I invoke:
It will throw:Code:... context.addAttributeValue("alias", "aaaaa",false); context.addAttributeValue("alias", "bbbbb",false); ldapTemplate.modifyAttributes(context); ...
Caused by: javax.naming.directory.AttributeInUseException: [LDAP: error code 20 - Attribute Or Value Exists]; remaining name 'uid=jkyang,ou=test4,ou=test2,ou=People'
at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.jav a:3025)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCt x.java:2987)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCt x.java:2794)
at com.sun.jndi.ldap.LdapCtx.c_modifyAttributes(LdapC tx.java:1455)
at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_mod ifyAttributes(ComponentDirContext.java:255)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContex t.modifyAttributes(PartialCompositeDirContext.java :172)
at javax.naming.directory.InitialDirContext.modifyAtt ributes(InitialDirContext.java:153)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at org.springframework.ldap.core.support.SingleContex tSource$NonClosingDirContextInvocationHandler.invo ke(SingleContextSource.java:136)
at $Proxy0.modifyAttributes(Unknown Source)
at org.springframework.ldap.core.LdapTemplate$19.exec uteWithContext(LdapTemplate.java:969)
at org.springframework.ldap.core.LdapTemplate.execute WithContext(LdapTemplate.java:807)
... 46 more
and when I invoke single addAttributeValue:
it is work ok.Code:context.addAttributeValue("alias", "bbbbb",false);
and if both 'aaaa' and 'bbbb' not existed already,it is work ok too.
I am using dsee 11g,and spring-ldap-1.3.1
any suggestion?
Best Rgds
L.J.W


Reply With Quote
