Bug #58
Error modifying/deleting some attribute
| Status: | Closed | Start: | 03/06/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | Jonathan Clarke | % Done: | 0% |
|
| Category: | Core | |||
| Target version: | 1.1.0 | |||
| Problem in version: |
Description
When trying to delete/modify the jpegPhoto attribute in LDAP, I get this exception:
Error while modifying directory on entry uid=marcel.bidon,ou=people / [Replace attribute: supannEtuID: 1116, Remove attribute: jpegPhoto: [B@7080ed90, Replace attribute: sn: Bidon, Replace attribute: cn: Marcel Bidon, Remove attribute: birthDate: 1986-12-29, Replace attribute: displayName: Marcel Bidon]
javax.naming.directory.InvalidSearchFilterException: [LDAP: error code 18 - modify/delete: jpegPhoto: no equality matching rule]; remaining name 'uid=marcel.bidon,ou=people'
at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3018)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2960)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2767)
at com.sun.jndi.ldap.LdapCtx.c_modifyAttributes(LdapCtx.java:1450)
at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_modifyAttributes(ComponentDirContext.java:255)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(PartialCompositeDirContext.java:172)
at javax.naming.directory.InitialDirContext.modifyAttributes(InitialDirContext.java:153)
at org.lsc.jndi.JndiServices.apply(JndiServices.java:519)
at org.lsc.AbstractSynchronize.synchronize2Ldap(AbstractSynchronize.java:416)
at org.lsc.SimpleSynchronize.launchTask(SimpleSynchronize.java:291)
at org.lsc.SimpleSynchronize.launch(SimpleSynchronize.java:179)
at org.lsc.Launcher.run(Launcher.java:128)
at org.lsc.Launcher.main(Launcher.java:111)
Erreur rencontrée sur l'identifiant marcel.bidon:
This thread gives some hint about that but I don't really know how to implement this in Java.
Associated revisions
Fixes #58. Delete an attribute without specifying a value
History
Updated by Jonathan Clarke about 1 year ago
- Category set to Core
- Target version set to 1.1.1
Hi, and thanks for opening this issue.
The problem is a general one, and happens with other attributes that don't have an equality matching rule defined, like facsimileTelephoneNumber. See this blog post: http://gcolpart.evolix.net/blog21/delete-facsimiletelephonenumber-attribute/
I think this is a JNDI problem, that even when all values of an attribute are deleted, it still specifies a value list in the LDAP modify operation. Despite googling, I've never found a way round this...
I'm targeting this for 1.1.1, to get 1.1.0 out as soon as possible, and since this only happens on a limited number of attributes. However, if someone finds a fix for it, it's most welcome :)
Updated by Jonathan Clarke about 1 year ago
- Status changed from New to Closed
- Assigned to set to Jonathan Clarke
- Target version changed from 1.1.1 to 1.1.0
OK, I did actually find this in the end. Turns out it was rather simple: you just need a ModificationItem set to REMOVE_ATTRIBUTE, with an Attribute object with no values...
Anyway, it works as of revision #242. Tomorrow's SNAPSHOT will solve this.