You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "LdapUser (JIRA)" <ji...@apache.org> on 2007/05/10 12:48:15 UTC

[jira] Created: (DIRSERVER-924) Add attribute already exists (remove - add again same entry)

Add attribute already exists (remove - add again same entry)
------------------------------------------------------------

                 Key: DIRSERVER-924
                 URL: https://issues.apache.org/jira/browse/DIRSERVER-924
             Project: Directory ApacheDS
          Issue Type: Bug
          Components: ldap
    Affects Versions: 1.5.0
            Reporter: LdapUser


Hi,

through Java we try to delete an attribute which exists more then once (uniqemember).
When we delete this attribute and try to add the same again we get the following error:

org.springframework.ldap.UncategorizedLdapException: Operation failed; nested exception is javax.naming.directory.AttributeInUseException: [LDAP: error code 20 - failed to modify entry cn=CCD,ou=roles,dc=mediamine,dc=com: Trying to add existing value 'uid=Sabrina,ou=users,dc=mediamine,dc=com' to attribute uniquemember]; remaining name 'cn=CCD,ou=roles'
Caused by: javax.naming.directory.AttributeInUseException: [LDAP: error code 20 - failed to modify entry cn=CCD,ou=roles,dc=mediamine,dc=com: Trying to add existing value 'uid=Sabrina,ou=users,dc=mediamine,dc=com' to attribute uniquemember]; remaining name 'cn=CCD,ou=roles'
        at com.sun.jndi.ldap.LdapCtx.mapErrorCode(Unknown Source)
        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_modifyAttributes(Unknown Source)
        at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_modifyAttributes(Unknown Source)
        at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(Unknown Source)
        at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(Unknown Source)
        at javax.naming.directory.InitialDirContext.modifyAttributes(Unknown Source)
        at com.mediamine.LDAP.LDAPUserDAO$3.executeWithContext(LDAPUserDAO.java:272)
        at org.springframework.ldap.LdapTemplate.executeWithContext(LdapTemplate.java:762)
        at org.springframework.ldap.LdapTemplate.executeReadWrite(LdapTemplate.java:757)
        at com.mediamine.LDAP.LDAPUserDAO.insertRoleToUser(LDAPUserDAO.java:264)
        at com.mediamine.LDAP.LDAPUserDAO.linkRoleToUser(LDAPUserDAO.java:185)
        at com.mediamine.LDAP.LDAPUserDAOTest.checkModify(LDAPUserDAOTest.java:161)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
        at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
        at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
        at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
        at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
        at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
        at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
        at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
        at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
        at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
        at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

The attribute isn't visible with an LDAP-Client, only if we restarts the server (ApacheDS 1.5.0) he reindexes and the attribute is visible.


What's the problem?

Thanks! x
Sabrina

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (DIRSERVER-924) Add attribute already exists (remove - add again same entry)

Posted by "LdapUser (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-924?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

LdapUser closed DIRSERVER-924.
------------------------------

    Resolution: Cannot Reproduce

Problem fixed...

> Add attribute already exists (remove - add again same entry)
> ------------------------------------------------------------
>
>                 Key: DIRSERVER-924
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-924
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: LdapUser
>
> Hi,
> through Java we try to delete an attribute which exists more then once (uniqemember).
> When we delete this attribute and try to add the same again we get the following error:
> org.springframework.ldap.UncategorizedLdapException: Operation failed; nested exception is javax.naming.directory.AttributeInUseException: [LDAP: error code 20 - failed to modify entry cn=CCD,ou=roles,dc=mediamine,dc=com: Trying to add existing value 'uid=Sabrina,ou=users,dc=mediamine,dc=com' to attribute uniquemember]; remaining name 'cn=CCD,ou=roles'
> Caused by: javax.naming.directory.AttributeInUseException: [LDAP: error code 20 - failed to modify entry cn=CCD,ou=roles,dc=mediamine,dc=com: Trying to add existing value 'uid=Sabrina,ou=users,dc=mediamine,dc=com' to attribute uniquemember]; remaining name 'cn=CCD,ou=roles'
>         at com.sun.jndi.ldap.LdapCtx.mapErrorCode(Unknown Source)
>         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_modifyAttributes(Unknown Source)
>         at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_modifyAttributes(Unknown Source)
>         at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(Unknown Source)
>         at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(Unknown Source)
>         at javax.naming.directory.InitialDirContext.modifyAttributes(Unknown Source)
>         at com.mediamine.LDAP.LDAPUserDAO$3.executeWithContext(LDAPUserDAO.java:272)
>         at org.springframework.ldap.LdapTemplate.executeWithContext(LdapTemplate.java:762)
>         at org.springframework.ldap.LdapTemplate.executeReadWrite(LdapTemplate.java:757)
>         at com.mediamine.LDAP.LDAPUserDAO.insertRoleToUser(LDAPUserDAO.java:264)
>         at com.mediamine.LDAP.LDAPUserDAO.linkRoleToUser(LDAPUserDAO.java:185)
>         at com.mediamine.LDAP.LDAPUserDAOTest.checkModify(LDAPUserDAOTest.java:161)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>         at java.lang.reflect.Method.invoke(Unknown Source)
>         at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
>         at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
>         at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
>         at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
>         at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
>         at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
>         at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
>         at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
>         at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
>         at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
>         at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
>         at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> The attribute isn't visible with an LDAP-Client, only if we restarts the server (ApacheDS 1.5.0) he reindexes and the attribute is visible.
> What's the problem?
> Thanks! x
> Sabrina

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.