directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject Re: Loading ldif files into apache ds
Date Thu, 29 Mar 2007 23:12:12 GMT
tux-07 a écrit :

> Hello guys,
>
> What is the best way to load an ldif file into the apachds DIT. I have
> tried the following so far unsuccessfully:
> 1) I have attempted to import the ldif using LDAP Studio and I get an 
> error:
> Error while importing LDIF
>  [LDAP: error code 32 - failed to add entry o=internet: o=internet]
> 2) I tried adding the o=internet under dc=example, dc=com but that did
> not allow the import either as I assume it is looking for o=internet
> to be one of the main partitions like it is in the server I exported
> the ldif from.
> 3) I tried adding another partition using the server xml file by
> copying the examplePartitionConfiguration and make the respective
> adjustments and restarting the server. That did not work: when I check
> with LDAP Studio I cannot see any changes to the DIT.
> 4) I tried using the import utility that comes with apacheds and that
> lead to the same result.
> [root@localhost bin]# ./apacheds-tools.sh import -f export.ldif
>       _                     _          ____  ____    _____           _
>      / \   _ __   __ _  ___| |__   ___|  _ \/ ___|  |_   _|__   ___ | 
> |___
>     / _ \ | '_ \ / _` |/ __| '_ \ / _ \ | | \___ \    | |/ _ \ / _ \| 
> / __|
>    / ___ \| |_) | (_| | (__| | | |  __/ |_| |___) |   | | (_) | (_) | 
> \__ \
>   /_/   \_\ .__/ \__,_|\___|_| |_|\___|____/|____/    |_|\___/ 
> \___/|_|___/
>           |_|
>
> log4j:WARN No appenders could be found for logger
> (org.apache.directory.shared.ldap.codec.bind.SimpleAuthentication).
> log4j:WARN Please initialize the log4j system properly.
> Add of entry o=internet failed for the following reasons provided by 
> the server:
> failed to add entry o=internet: o=internet
> Import failed...
>
> I have read the documentation with the download and googled but
> nothing gives me a clue.
> I am stuck again...


Well, this is plain normal. You can just import an entry like 
o=internet, because it is not associated to any partition. It's a little 
bit like you are trying to copy a file to an unmounted partition (this 
is the best analogy I have found : a Ldap partition is like a mounted 
file system on linux, and the DN is like the path to the entry)

You should first declare a partition o=internet into your server.xml 
(just copy/paste the dc=example, dc=com partition, and rename it to 
o=internet. You will also have to declare the top level entry at the 
end, with the objectClass organization). Just have a look at 
http://directory.apache.org/apacheds/1.0/14-basic-configuration-tasks.html
"adding your own partition".

Hope it helps,
Emmanuel

Mime
View raw message