I got a really annoying problem with the importation of LDIF file into my own LDAP server application. My LDAP server is working really well and I'm able to add and remove entry. But when it's time to applying an LDIF file, it's where it doesn't seem to work.
My goal is to create by programation an LDAP server for JUnittest, it must work without any servlet configuration file and external tools. It must be completely autonomous within the JUnit test.
I made some serachs with Google and I haven't found a working solution, so far, one doesn't create error but is doing nothing and the other is throwing exceptions :
This seems very simple, it does not throw exception, but I see no changes on my ldap server. I don't understand why ?
That one throws exceptions like this :
Why should it care about an existing LdapName ? I want to remove everything a start a new with that new LDIF file. If you have any ideas on how I can clear the directories and import a new with an LDIF file without using servlets and xml configurations, please tell me.
posted 2 years ago
you have to create the partition "mystuff" before load the ldif file.
In apache studio double click your ldap server, that brings to you the server.xml editor.
Move to the 'Partitions' tab and create your partition.