pingidentity / ldapsdk

UnboundID LDAP SDK for Java
Other
327 stars 79 forks source link

Unable to create a custom attributeTypes #119

Closed 3l0w closed 2 years ago

3l0w commented 2 years ago

Hello, i am trying to add a custom attributeTypes:

dn: dc=test,dc=fr
objectclass: extensibleObject
objectclass: domain
objectclass: top
dc: test
o: test

dn: cn=schema
changeType: modify
add: attributeTypes
attributeTypes: ( 1.45.11.1.1
       NAME 'discordTag'
       DESC 'Discord Tag of the person'
       EQUALITY caseExactMatch
       SUBSTR caseExactSubstringsMatch
       SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )

But when i do that i got this error: Unable to add an entry with a DN that is the same as or subordinate to the subschema subentry DN 'cn=schema'.

Note: i am using the sdk with spring

dirmgr commented 2 years ago

Even though the LDIF that you have is for a change record, the error message you're getting makes it sound like an attempt to perform an add rather than a modify. You should use a ModifyRequest rather than an AddRequest to make the change.

3l0w commented 2 years ago

I figured out, in spring there is two way to config related to ldif files