directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Czurda <>
Subject Re: connection.getSchemaManager() returns null
Date Sat, 10 Dec 2011 19:28:19 GMT

On 12/10/2011 07:43 PM, Emmanuel Lecharny wrote:
> On 12/10/11 7:25 PM, Christoph Czurda wrote:
>> On 12/10/2011 06:29 PM, Kiran Ayyagari wrote:
>>> On Sat, Dec 10, 2011 at 12:25 PM, Christoph Czurda
>>> <>  wrote:
>>>> Hello,
>>>> Why does connection.getSchemaManager() return null? My connection is
>>>> connected and bound.
>>> you have to call connection.loadSchema() first.
>> I did that and then it worked, thank you.
>>>> I want to add a custom ObjectClass which is why I need the
>>>> SchemaManager.
>>> if you want to add new entries based on this objectclass then you
>>> should add that in the server
>> Using ApacheDS I guess I do this by placing an ldif file containing my
>> object class somewhere into instances/default/partitions/schema ? Could
>> you point out to me how to find the exact location?
> depends on the schema you are updating.
> Let's say you are updating cn=other, and that you are adding an
> ObjectClass. You have to add the ObjectClass ldif file in :
> instances/default/partitions/schema/ou=schema/cn=other/ou=objectclasses
> If this ou=objectclasses directory does not exist, create it.
> The ObjectClass must be a ldif file which name is m-oid=<your oid>.ldif
> You can create this ldif file using Apache directory studio.
Yes, it worked! DirectoryStudio took care of everything. I connected to
the server I am using for my application and Studio placed it in the
correct location.
> You also have to restart the server.
> Note that you can also inject your new ObjectClass into the server using
> the same LDIF file, it will be available directly.
So theres usually no need to load a SchemaManager inside my Application,
right? Because a call to connection.loadSchema() takes about 20 minutes
to finish.

Thank you,
Kind regards,

View raw message