Adding New Attribute of a New Objectclass to an Existing Entry in OID or OUD Fails: Ldap_modify: Failed to find <Attribute Name> in mandatory or optional attribute list / How to Add New Objectclass to an Entry
(Doc ID 378345.1)
Last updated on JULY 11, 2023
Applies to:
Oracle Internet Directory - Version 9.0.4 and laterOracle Unified Directory - Version 11.1.2.3.0 and later
Information in this document applies to any platform.
Symptoms
Adding a new objectclass (including its mandatory and/or optional attributes) to an existing entry in Oracle Internet Directory (OID) or Oracle Unified Directory (OUD) fails.
Using ldapmodify to add new attribute and value to an existing entry in OID with the following ldif file, for example:
changetype: modify
add: c
c: <country>
But the ldapmodify with this ldif file fails with error:
<country>
modifying entry cn=<USERNAME>,cn=users,dc=<COMPANY>,dc=com
ldap_modify: Object class violation
ldap_modify: additional info: Failed to find c in mandatory or optional attribute list.
As the c attribute is part of objectclass country, but this user entry does not currently have this objectclass, if then trying to modify the entry to add the objectclass country using the following ldif file:
changetype: modify
add: objectclass
objectclass: country
That ldapmodify then fails with:
country
modifying entry cn=<USERNAME>,cn=users,dc=<COMPANY>,dc=com
ldap_modify: Type or value exists
ldap_modify: additional info: objectclass attribute has duplicate value.
The same error can occur when adding a new objectclass that has no mandatory attributes, just optional ones.
Below is an example when using OUD:
add cn:
<CN_VALUE>
add objectclass:
top
orclNetService
add orclNetDescString:
(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=<DB_HOSTNAME>)(PORT=<PORT>)))(CONNECT_DATA=(SERVICE_NAME=<SERVICE_NAME>)))
adding new entry cn=<CN_VALUE>,cn=OracleContext,dc=<DOMAIN>,dc=<COUNTRY>
ldap_add: Object class violation
ldap_add: additional info: Entry cn=<CN_VALUE>,cn=OracleContext,dc=<DOMAIN>,dc=<COUNTRY> violates the Directory Server schema configuration because it contains an unknown objectclass top
Changes
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Changes |
Cause |
Solution |