OID ldapadd Command Fails with Error ldap_add: Object class violation or ldap_add_s: Constraint violation
(Doc ID 1379627.1)
Last updated on OCTOBER 16, 2019
Applies to:Oracle Internet Directory - Version 10.1.4.0.1 to 11.1.1 [Release 10gR3 to 11g]
Information in this document applies to any platform.
1.ldapadd command fails with below common error message.
"ldap_add: Object class violation"
2.Examples of failed ldapadd commands
>ldapadd -p <PORT> -h <OID_HOSTNAME> -D "cn=orcladmin" -w <PASSWORD> -v -f <FILENAME>.ldif
adding new entry dc=<DOMAIN>
ldap_add: Constraint violation
ldap_add: additional info: Admin domain does not contain schema information for objectclass domain.
>ldapadd --p <PORT> -h <OID_HOSTNAME> -D "cn=orcladmin" -w <PASSWORD> -v -f <FILENAME>.ldif
adding new entry cn=<CN>,cn=OracleContext
ldap_add: Object class violation
ldap_add: additional info: dc attribute not found. Mandatory Attribute missing.
In this case it was OID 10.1.4.0.1.
But same note applies for later OID versions if above error is faced.
OID Schema ObjectClasses were not as per standard definition.
Here in this case we had two issues
1. "domain" objectclass was missing.
2."top" objectclass was modified unknowingly and was not as per standard default installation
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