Working with the InMemoryDirectoryService for my JUnit tests and while validating is working correctly, I get an LDAPException during the merge process. The message states:
Unable to modify entry '<<My Entry DN>>' because the entry resulting from applying the modifications would have violated the provided schema: The entry contains attribute entryDN which is not defined in the schema.
The problem is that no where in my LDIF files is there an attribute called entryDN. Also in my code I cannot find any instance of my use of the value entryDN where could the come from?
The entry at issue is a change LDIF entry that looks like this:
The exception is thrown when I perform LDIFChangeRecord.processChange(LDAPConnection) what I would like to know is where this attribute name entryDN is coming from.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
entryDN is an operational attribute described in RFC 5020 and is intended to hold the DN of the entry containing that attribute so that it can be more easily used in search filters. The in-memory directory server automatically generates it, along with a number of other operational attributes like entryUUID, creatorsName, createTimestamp, modifiersName, modifyTimestamp, and subschemaSubentry.
Operational attributes should generally be ignored when comparing entries, but without entryDN defined in the schema, the in-memory directory server doesn't know that it's supposed to be operational.
You should be able to address this in one of two ways. One option would be to define the entryDN attribute (and if necessary the additional operational attributes) in the schema by adding the following to the schema LDIF file:
The other option would be to configure the in-memory directory server so that it won't try to automatically maintain these operational attributes. You can do that by calling the InMemoryDirectoryServerConfig.setGenerateOperationalAttributes method with a value of false.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
Working with the InMemoryDirectoryService for my JUnit tests and while validating is working correctly, I get an LDAPException during the merge process. The message states:
The problem is that no where in my LDIF files is there an attribute called
entryDN
. Also in my code I cannot find any instance of my use of the valueentryDN
where could the come from?The entry at issue is a change LDIF entry that looks like this:
The exception is thrown when I perform
LDIFChangeRecord.processChange(LDAPConnection)
what I would like to know is where this attribute nameentryDN
is coming from.entryDN is an operational attribute described in RFC 5020 and is intended to hold the DN of the entry containing that attribute so that it can be more easily used in search filters. The in-memory directory server automatically generates it, along with a number of other operational attributes like entryUUID, creatorsName, createTimestamp, modifiersName, modifyTimestamp, and subschemaSubentry.
Operational attributes should generally be ignored when comparing entries, but without entryDN defined in the schema, the in-memory directory server doesn't know that it's supposed to be operational.
You should be able to address this in one of two ways. One option would be to define the entryDN attribute (and if necessary the additional operational attributes) in the schema by adding the following to the schema LDIF file:
The other option would be to configure the in-memory directory server so that it won't try to automatically maintain these operational attributes. You can do that by calling the InMemoryDirectoryServerConfig.setGenerateOperationalAttributes method with a value of false.