File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes [ApacheDS] How to import an ldif file ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "[ApacheDS] How to import an ldif file ?" Watch "[ApacheDS] How to import an ldif file ?" New topic
Author

[ApacheDS] How to import an ldif file ?

Leinad Nongag
Greenhorn

Joined: Aug 25, 2009
Posts: 18
Hello everybody,

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 JUnit test, 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.
Carles Gasques
Ranch Hand

Joined: Apr 19, 2013
Posts: 199
    
    1
Hi,
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.


Best regards,
 
 
subject: [ApacheDS] How to import an ldif file ?