Currently ldap-server requires multiple LDIF files if an entry contains a changetype entry and does not properly apply modifications.
One use-case is: Enable a build-in schema, add attribute types and sample data.
It was tested with ldapadd, which happily accepted this case and applied the changes, while ldap-server rejected them:
[main] ERROR org.apache.directory.api.ldap.model.ldif.LdifReader - ERR_12004_CHANGE_NOT_ALLOWED We cannot have changes when reading a file which already contains entries, at line 6 [main] ERROR org.apache.directory.api.ldap.model.ldif.LdifReader - ERR_12005_NO_CHANGE No changes within entries Exception in thread "main" java.lang.NullPointerException: Cannot invoke "org.apache.directory.api.ldap.model.ldif.LdifEntry.getDn()" because "ldifEntry" is null
at com.github.kwart.ldap.LdapServer.checkPartition(LdapServer.java:184)
at com.github.kwart.ldap.LdapServer.importLdif(LdapServer.java:173)
at com.github.kwart.ldap.LdapServer.importLdif(LdapServer.java:165)
at com.github.kwart.ldap.LdapServer.<init>(LdapServer.java:97)
at com.github.kwart.ldap.LdapServer.main(LdapServer.java:76)
Currently ldap-server requires multiple LDIF files if an entry contains a changetype entry and does not properly apply modifications.
One use-case is: Enable a build-in schema, add attribute types and sample data.
It was tested with
ldapadd
, which happily accepted this case and applied the changes, while ldap-server rejected them: