I am not able to modify attributes in eclipse.Getting error Modify operation attempts to delete RDN attribute values in use for 2.5.4.3 on entry 2.5.4.3=some person2,2.5.4.11=company1,2.5.4.6=sweden,0.9.2342.19200300.100.1.25=jayway,0.9.2342.19200300.100.1.25=se and violates schema constraints
using this code to modify attributes: Attribute attr = new BasicAttribute("cn", "new"); ModificationItem item = new ModificationItem(DirContext.REPLACE_ATTRIBUTE, attr); lt.modifyAttributes(dn, new ModificationItem[] {item});
lt.modifyAttributes(context);
Using https://docs.spring.io/spring-ldap/docs/2.3.3.RELEASE/reference/#spring-ldap-testing-unboundid to create local ldap server. data in setup-data.ldif dn: cn=Some Person2,ou=company1,c=Sweden,dc=jayway,dc=se objectclass: top objectclass: person objectclass: organizationalPerson objectclass: inetOrgPerson uid: some.person2 userPassword: password cn: Some Person2 sn: Person2 description: Sweden, Company1, Some Person2 telephoneNumber: +46 555-654321
<context:property-placeholder location="classpath:/ldap.properties" />
<ldap:context-source id="contextSource"
password="${sample.ldap.password}"
url="${sample.ldap.url}"
username="${sample.ldap.userDn}"
base="${sample.ldap.base}" />
<ldap:ldap-template id="ldapTemplate" context-source-ref="contextSource"/>
<!--
This is for test and demo purposes only - EmbeddedLdapServerFactoryBean launches an in-process
LDAP server.
-->
<bean id="embeddedLdapServer" class="org.springframework.ldap.test.EmbeddedLdapServerFactoryBean">
<property name="partitionName" value="example"/>
<property name="partitionSuffix" value="${sample.ldap.base}" />
<property name="port" value="18880" />
</bean>
</beans>
<beans profile="no-apacheds">
<!-- Populates the LDAP server with initial data -->
<bean class="org.springframework.ldap.test.LdifPopulator">
<property name="contextSource" ref="contextSource" />
<property name="resource" value="classpath:/setup_data.ldif" />
<property name="base" value="${sample.ldap.base}" />
<property name="clean" value="${sample.ldap.clean}" />
<property name="defaultBase" value="dc=jayway,dc=se" />
</bean>
</beans>