directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George Stoianov" <gstoyan...@gmail.com>
Subject Re: Loading ldif files into apache ds
Date Wed, 04 Apr 2007 18:42:16 GMT
On 4/3/07, Emmanuel Lecharny <elecharny@gmail.com> wrote:
> George Stoianov a écrit :
>
> > Hi Emmanuel,
>
> Hi George,

Hi Emmanuel,

>
> >
> > You will notice that I have from this post switched over to the user's
> > list... I hope I get the same or better responses there  ;).
>
> Yes, thanks :) We will try to provide much better answer !

Excellent, I love the user's list! :)

>
> >
> > Thanks for your instructions they were helpful in getting additional
> > partitions going I am still having an issue though:
> > root@localhost bin]# ./apacheds-tools.sh import -f <path-to-file>
> >       _                     _          ____  ____    _____           _
> >      / \   _ __   __ _  ___| |__   ___|  _ \/ ___|  |_   _|__   ___ |
> > |___
> >     / _ \ | '_ \ / _` |/ __| '_ \ / _ \ | | \___ \    | |/ _ \ / _ \|
> > / __|
> >    / ___ \| |_) | (_| | (__| | | |  __/ |_| |___) |   | | (_) | (_) |
> > \__ \
> >   /_/   \_\ .__/ \__,_|\___|_| |_|\___|____/|____/    |_|\___/
> > \___/|_|___/
> >           |_|
> >
> > 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: 2.5.4.10=internet already exists!
> > Import failed...
>
> Have you tried with LdapStudio ? (I'm not very confident on apacheds
> tools ...)

It is funny to hear that :), they are made be apacheds, aren't they
;), and yes I did try LdapStudio same error

>
> Can you also post the ldif file or at least the ldif entry you are
> trying to insert ?

Here is the entry that is causing the above error:
-----------------------------------------------------------------------------
version: 1

# entry-id: 1
dn: o=internet
objectClass: top
objectClass: organization
o: internet
creatorsName: cn=directory manager
modifiersName: cn=directory manager
createTimestamp: 20060406132955Z
modifyTimestamp: 20060406132955Z
nsUniqueId: 6a861786-1dd211b2-8094c2e0-bcc15857
-----------------------------------------------------------------------------


>
> >
> > It seems like now it is making an attempt to add the internet entry
> > and failing, and the first problem was that it was not finding it so
> > it was not making an attempt to add I am really confused ..... :(
>
> The message says that the entry already exist... Strange. Can you see it
> with LdapStudio ?

Yes I can. It is there because I added it using the server.xml file.
The reason I did this is because when I attempted imports before
without having it in I got an error saying it was not found so I could
not import....

>
> >
> > I tried adding an "-e" option to the import command above, I saw it
> > posted on the lists, and that lead to a:
> >
> > Exception in thread "main" java.lang.NullPointerException
> >        at
> > org.apache.directory.shared.ldap.codec.add.AddRequest.computeLength(AddRequest.java:281)
> >
> >        at
> > org.apache.directory.shared.ldap.codec.LdapMessage.computeLength(LdapMessage.java:535)
> >
> >        at
> > org.apache.directory.shared.ldap.codec.LdapMessage.encode(LdapMessage.java:613)
> >
> >        at
> > org.apache.directory.server.tools.ImportCommand.addEntry(ImportCommand.java:249)
> >
> >        at
> > org.apache.directory.server.tools.ImportCommand.execute(ImportCommand.java:666)
> >
> >        at
> > org.apache.directory.server.tools.ApachedsTools.main(ApachedsTools.java:115)
> >
>
> Ohhh... That's a damn bug ! Can you post the ldif which generate this
> stack ? Is it possible that you have an empty value in the ldif file ?

The ldif has some sensitive data and is approx. 280 MB so I cannot
realy post it but if you do not mind working with me to find the entry
I will attempt to post that.

These are the lines just before the NullPointerException (as displayed
by the logging when starting the server in debug mode):

Add of entry cn=util.logservice.log4j.MyTool.configFile,ou=default,o=Pumis
Configuration failed for the following
failed to add entry
cn=util.logservice.log4j.MyTool.configFile,ou=default,o=Pumis
Configuration: Parent ou=default
.Add of entry cn=data.integration.destination.MainDispatch.name,ou=default,o=Pumis
Configuration failed for the fo
failed to add entry
cn=data.integration.destination.MainDispatch.name,ou=default,o=Pumis
Configuration: Parent ou=
Exception in thread "main" java.lang.NullPointerException
        at org.apache.directory.shared.ldap.codec.add.AddRequest.computeLength(AddRequest.java:281)
        at

the entry from the ldif reads:

 # entry-id: 260
   3249 dn: cn=data.integration.destination.MainDispatch.name,ou=default,o=Pumis
Con
   3250  figuration
   3251 objectClass: top
   3252 objectClass: pdsconfigoc
   3253 cn: data.integration.destination.MainDispatch.name
   3254 creatorsName: uid=configmaster,ou=people,o=pumis configuration
   3255 createTimestamp: 20060406133825Z
   3256 nsUniqueId: 7cb485fb-1dd211b2-8095c2e0-bcc15857
   3257 pdsConfigValue: topic$com_my_integ_sis_Sync
   3258 modifiersName: uid=configmaster,ou=people,o=pumis configuration
   3259 modifyTimestamp: 20070319163759Z
   3260
   3261 # entry-id: 261
   3262 dn: cn=content.path.ta.url,ou=default,o=Pumis Configuration
   3263 objectClass: top
   3264 objectClass: pdsconfigoc
   3265 cn: content.path.ta.url
   3266 creatorsName: uid=configmaster,ou=people,o=pumis configuration
   3267 createTimestamp: 20060406133825Z
   3268 nsUniqueId: 7cb485fc-1dd211b2-8095c2e0-bcc15857
   3269 pdsConfigValue:
   3270 modifiersName: uid=configmaster,ou=people,o=pumis configuration
   3271 modifyTimestamp: 20070319163759Z

The entry 261 is probably the one being processed when the exception
is thrown. The numbers are line numbers.

>
> >
> > Is there a way to just load the ldif using the:
> > <property name="ldifDirectory">
>
> You can tell the server to load a ldif file on startup, by modifying the
> server.xml file, yes.

I did so but I am not seeing anything in LDAPStudio where can I see
error messages or status etc.?? I am runnig the server in debug mode
nothing shows up. I am trying to load the same ldif I am attempting to
import, and if that causes problems then loading it should too right??

>
> >
> > I alsohave some attributes problems (the export is from a Netscape
> > LDAP server).
> >
> > "... nsuniqueid not found in attribute registry! "
> > "...  aci not found in attribute registry! "
> >
> > If I remove these fields from the ldif will the import work?
>
> Well, I don't know without looking at the file ... What I can say is
> that all the attributeTypes must be declared in the server if you want
> to be able to load them. For instance, the 'aci' attribute is likely to
> be Netscape specific, so is nsuniqueid (we don't have such attribute).
> You will have to declare them in the schema in order to be able to load
> a ldif file with such attributes.

OK how do I do that is it on the site? I will check...I am new to all
of this so any pointers are more than welcome.
Thanks again.

>
> > Thank you.
>
> My pleasure !
>
> Emmanuel
>

Mime
View raw message