You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by Manish Kutaula <ma...@tcs.com> on 2011/05/18 13:43:05 UTC

Problema adding attributes and schema browser not showing them

Now, seriously this is giving me headaches. i added one attribute 
"secretA" and class "userPerson" using JNDI. The code is given below.

 Attributes atAttrs = new BasicAttributes(true);
                atAttrs.put("attributeTypes", 
"(1.3.6.1.4.1.18060.0.4.3.4.1 NAME 'secretA' DESC 'answer of secret 
question' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 
SINGLE-VALUE)");
                ctx.modifyAttributes("cn=schema", DirContext.ADD_ATTRIBUTE
, atAttrs);

                Attributes ocAttrs = new BasicAttributes(true);
                ocAttrs.put("objectClasses", "( 
1.3.6.1.4.1.18060.0.4.3.5.2 NAME 'userPerson' DESC 'An entry which 
represents employee values' SUP inetOrgPerson STRUCTURAL MUST cn MAY ( 
secretAnswer ) )");
                ctx.modifyAttributes("cn=schema", DirContext.ADD_ATTRIBUTE
, ocAttrs);

Restarted the server and checked the schema browser in apacheds directory 
studio which donot shows the entries. Previously i added some attributed 
and different class using same program and the schema browser showed them.

This is kind a frustrating. Is this some bug in apacheds or am i doing 
wrong.
need help.

-Manish Kutaula
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you



Re: Problema adding attributes and schema browser not showing them

Posted by Kiran Ayyagari <ka...@apache.org>.
open the Schema Editor perspective by choosing Window -> Open
Perspective -> Schema Editor

Then just create a schema project, UI is intuitive enough to continue
from there onwards, let us know if you have any issues.

On Wed, May 18, 2011 at 5:51 PM, Manish Kutaula <ma...@tcs.com> wrote:
> I got your point but still i am not figure out how to do it using
> directory studio.
> Is their any documentation available for it.
>
> Manish Kutaula
>
>
>
>
> From:
> Kiran Ayyagari <ka...@apache.org>
> To:
> users@directory.apache.org
> Date:
> 05/18/2011 05:24 PM
> Subject:
> Re: Problema adding attributes and schema browser not showing them
> Sent by:
> ayyagarikiran@gmail.com
>
>
>
> cn=schema is supposed to be used for querying the schema only, if you
> want to add a new attributetype or objectclass the best way is
> to create them in the ApacheDS specific meta schema format (you can
> use Studio to create them, it is easy) and add them as
> normal entries to the respective containers of the schema i.e
> if your custom schema name is FOO and you want to add a new attribute
> type 'barAT' then the new attributetype entry should be added under
> ou=attributetypes,ou=FOO,ou=config . Similarly for objectclasses it
> should go under ou=objectclasses
>
> Having said this, ApacheDS also has a feature to update the schema if
> the changes are targeted at 'cn=schema', so what you have encountered
> might be a bug, am not sure though, but the best way is to directly
> make the modifications under the ou=schema partition.
>
>
> On Wed, May 18, 2011 at 5:13 PM, Manish Kutaula <ma...@tcs.com>
> wrote:
>> Now, seriously this is giving me headaches. i added one attribute
>> "secretA" and class "userPerson" using JNDI. The code is given below.
>>
>>  Attributes atAttrs = new BasicAttributes(true);
>>                atAttrs.put("attributeTypes",
>> "(1.3.6.1.4.1.18060.0.4.3.4.1 NAME 'secretA' DESC 'answer of secret
>> question' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
>> SINGLE-VALUE)");
>>                ctx.modifyAttributes("cn=schema",
> DirContext.ADD_ATTRIBUTE
>> , atAttrs);
>>
>>                Attributes ocAttrs = new BasicAttributes(true);
>>                ocAttrs.put("objectClasses", "(
>> 1.3.6.1.4.1.18060.0.4.3.5.2 NAME 'userPerson' DESC 'An entry which
>> represents employee values' SUP inetOrgPerson STRUCTURAL MUST cn MAY (
>> secretAnswer ) )");
>>                ctx.modifyAttributes("cn=schema",
> DirContext.ADD_ATTRIBUTE
>> , ocAttrs);
>>
>> Restarted the server and checked the schema browser in apacheds
> directory
>> studio which donot shows the entries. Previously i added some attributed
>> and different class using same program and the schema browser showed
> them.
>>
>> This is kind a frustrating. Is this some bug in apacheds or am i doing
>> wrong.
>> need help.
>>
>> -Manish Kutaula
>> =====-----=====-----=====
>> Notice: The information contained in this e-mail
>> message and/or attachments to it may contain
>> confidential or privileged information. If you are
>> not the intended recipient, any dissemination, use,
>> review, distribution, printing or copying of the
>> information contained in this e-mail message
>> and/or attachments to it are strictly prohibited. If
>> you have received this communication in error,
>> please notify us by reply e-mail or telephone and
>> immediately and permanently delete the message
>> and any attachments. Thank you
>>
>>
>>
>
>
>
> --
> Kiran Ayyagari
>
>
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
>



-- 
Kiran Ayyagari

Re: Problema adding attributes and schema browser not showing them

Posted by Emmanuel Lecharny <el...@gmail.com>.
On 5/18/11 2:21 PM, Manish Kutaula wrote:
> I got your point but still i am not figure out how to do it using
> directory studio.
> Is their any documentation available for it.
http://directory.apache.org/apacheds/1.5/31-add-your-first-elements-to-the-schema.html


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Re: Problema adding attributes and schema browser not showing them

Posted by Manish Kutaula <ma...@tcs.com>.
I got your point but still i am not figure out how to do it using 
directory studio. 
Is their any documentation available for it.

Manish Kutaula




From:
Kiran Ayyagari <ka...@apache.org>
To:
users@directory.apache.org
Date:
05/18/2011 05:24 PM
Subject:
Re: Problema adding attributes and schema browser not showing them
Sent by:
ayyagarikiran@gmail.com



cn=schema is supposed to be used for querying the schema only, if you
want to add a new attributetype or objectclass the best way is
to create them in the ApacheDS specific meta schema format (you can
use Studio to create them, it is easy) and add them as
normal entries to the respective containers of the schema i.e
if your custom schema name is FOO and you want to add a new attribute
type 'barAT' then the new attributetype entry should be added under
ou=attributetypes,ou=FOO,ou=config . Similarly for objectclasses it
should go under ou=objectclasses

Having said this, ApacheDS also has a feature to update the schema if
the changes are targeted at 'cn=schema', so what you have encountered
might be a bug, am not sure though, but the best way is to directly
make the modifications under the ou=schema partition.


On Wed, May 18, 2011 at 5:13 PM, Manish Kutaula <ma...@tcs.com> 
wrote:
> Now, seriously this is giving me headaches. i added one attribute
> "secretA" and class "userPerson" using JNDI. The code is given below.
>
>  Attributes atAttrs = new BasicAttributes(true);
>                atAttrs.put("attributeTypes",
> "(1.3.6.1.4.1.18060.0.4.3.4.1 NAME 'secretA' DESC 'answer of secret
> question' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
> SINGLE-VALUE)");
>                ctx.modifyAttributes("cn=schema", 
DirContext.ADD_ATTRIBUTE
> , atAttrs);
>
>                Attributes ocAttrs = new BasicAttributes(true);
>                ocAttrs.put("objectClasses", "(
> 1.3.6.1.4.1.18060.0.4.3.5.2 NAME 'userPerson' DESC 'An entry which
> represents employee values' SUP inetOrgPerson STRUCTURAL MUST cn MAY (
> secretAnswer ) )");
>                ctx.modifyAttributes("cn=schema", 
DirContext.ADD_ATTRIBUTE
> , ocAttrs);
>
> Restarted the server and checked the schema browser in apacheds 
directory
> studio which donot shows the entries. Previously i added some attributed
> and different class using same program and the schema browser showed 
them.
>
> This is kind a frustrating. Is this some bug in apacheds or am i doing
> wrong.
> need help.
>
> -Manish Kutaula
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
>



-- 
Kiran Ayyagari


=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you



Re: Problema adding attributes and schema browser not showing them

Posted by Kiran Ayyagari <ka...@apache.org>.
cn=schema is supposed to be used for querying the schema only, if you
want to add a new attributetype or objectclass the best way is
to create them in the ApacheDS specific meta schema format (you can
use Studio to create them, it is easy) and add them as
normal entries to the respective containers of the schema i.e
if your custom schema name is FOO and you want to add a new attribute
type 'barAT' then the new attributetype entry should be added under
ou=attributetypes,ou=FOO,ou=config . Similarly for objectclasses it
should go under ou=objectclasses

Having said this, ApacheDS also has a feature to update the schema if
the changes are targeted at 'cn=schema', so what you have encountered
might be a bug, am not sure though, but the best way is to directly
make the modifications under the ou=schema partition.


On Wed, May 18, 2011 at 5:13 PM, Manish Kutaula <ma...@tcs.com> wrote:
> Now, seriously this is giving me headaches. i added one attribute
> "secretA" and class "userPerson" using JNDI. The code is given below.
>
>  Attributes atAttrs = new BasicAttributes(true);
>                atAttrs.put("attributeTypes",
> "(1.3.6.1.4.1.18060.0.4.3.4.1 NAME 'secretA' DESC 'answer of secret
> question' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
> SINGLE-VALUE)");
>                ctx.modifyAttributes("cn=schema", DirContext.ADD_ATTRIBUTE
> , atAttrs);
>
>                Attributes ocAttrs = new BasicAttributes(true);
>                ocAttrs.put("objectClasses", "(
> 1.3.6.1.4.1.18060.0.4.3.5.2 NAME 'userPerson' DESC 'An entry which
> represents employee values' SUP inetOrgPerson STRUCTURAL MUST cn MAY (
> secretAnswer ) )");
>                ctx.modifyAttributes("cn=schema", DirContext.ADD_ATTRIBUTE
> , ocAttrs);
>
> Restarted the server and checked the schema browser in apacheds directory
> studio which donot shows the entries. Previously i added some attributed
> and different class using same program and the schema browser showed them.
>
> This is kind a frustrating. Is this some bug in apacheds or am i doing
> wrong.
> need help.
>
> -Manish Kutaula
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
>



-- 
Kiran Ayyagari