directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny" <>
Subject Re: [ApacheDS] How to register attribute types and values?
Date Wed, 09 May 2007 23:36:09 GMT

On 5/10/07, Jo Jeeka <> wrote:
> Emmanuel,
> Thanks.  I do need more info.  Part of the problem is
> I don't maintain the LDAP here, I am just trying to
> add unit testing to our Java accessing the LDAP.  So
> some of this is not obvious to me.

Understood. Ldap is not a simple beast, too...

In order to get as far as we have I had to add way
> more JAR files to my project than was suggested on the
> web page describing how to use ApacheDS for Junit
> testing.  This is only brought up because as far as I
> know (until I go searching through all the JARs) I
> have not had to deal with a server.xml file directly
> to get the ApacheDS to start up (through eclispe Run
> Junit Test).  That is why I have seen the page you
> linked to before but thought it was for a more
> elaborate schema (than my quick version for unit
> testing) and I could just add in code a few attribute
> types to the schema as needed.  Looks like this is not
> the case.

Well, as we do some pretty heavy schema checking into the server, the short
answer is : you have to declare all the objectclasses and attributeTypes
before using them... For AttributeTypes, there is a workaround which is to
declare the extensibleObject as an objectclass value for your objects, but
then you will have to modify your tests, which is not something you want to
do, I guess. Also, this won't work for unknown ObjectClasses

I did notice that 1.0 did not allow dynamic updates of
> schema, does 1.0.1?

No, sorry. Dynamic schemas is a 1.5.0 feature. Why don't you switch to this
version ? Injecting schema into it is much more easier than dealing with
maven ... Of course, you will have to include some more jar to make it run,
but this will be also the case if you use 1.0 version.

There are some drawbacks in swtching to 1.5.0 : starting tests is much
slower, because the server has to dynamically load all the schema in memory.
OTOS, ADS 1.5.0 is much more stable and faster than 1.0.1 (I would say 40%

I will have to read up on Maven as I have not used it
> before.  I assume it works on Windows?

Windows, LLinuw, Solaris, Mac, any platform on which Java is running

I guess I am much farther away than I thought.  I
> thought once I got this far with it starting up in the
> Junit environment and having our domain objects set in
> the DS through code that I was just about there.

You are closer than you think. I will try to add an extension to the  "using
ADS emebeded for junit" for ADS 1.5.0, but it will be tomorrow (It's late in
Paris now ...)

In a netshell, do I have to get the schema (in some
> format) from our LDAP guy and use Maven to make it
> compatible with ApacheDS and then I am there?  Or is
> there more to it?

Get the schema. In Ldap, schema are like in any RDMS: without them, no way
to store data into the server !

Thanks a lot for your time!

My pleasure !

I hope you will have this running by the end of this week.

PS: just try to post those mails to users@directory, instead of posting them
to me personally (may be you just forgot to 'reply-all'). Not that I don't
want to receive them directly (I will receive any mail in users list anyway
;), but other people can help you if I'm offline, and also other users may
be interested by your questions and the answers. Thanks !

PS2 : It looks like that I was the first one to reply to you directly :)
Damn gmail !!!
Emmanuel L├ęcharny

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message