Ive understood that you can move an entry in the directory-tree and
its possible children-entries with one operation. This would be done
by renaming: oldDN "o=A, o=Root, c=fi" to for example newDN "ou=A,
o=Root, c=fi". This never works out though:
javax.naming.InvalidNameException: o=testiPT, o=testiPT, o=testiRP,
o=Juuri, l=A
mmattilaiset, c=fi: [LDAP: error code 64 - Update Error: Naming
Violation]; rema
ining name 'o=testiPT, o=testiPT, o=testiRP, o=Juuri, l=Ammattilaiset,
c=fi'
at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)
at com.sun.jndi.ldap.LdapCtx.c_rename(Unknown Source)
at com.sun.jndi.toolkit.ctx.ComponentContext.p_rename(Unknown
Source)
at com.sun.jndi.toolkit.ctx.PartialCompositeContext.rename(Unknown
Sourc
e)
at com.sun.jndi.toolkit.ctx.PartialCompositeContext.rename(Unknown
Sourc
e)
at javax.naming.InitialContext.rename(Unknown Source)
at LDAP.main(LDAP.java:58)
Ive used the javax.naming.directory.DirContext.rename(string oldDN,
string new DN)
Plain renaming works ok, but changing o to ou brings the problems.
Is this the right way at all?
--
Igor