You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by Kevin Hamilton <kh...@umem.org> on 2011/08/10 16:23:26 UTC

Adding universal attributes

Hello everyone,

I am somewhat new to ApacheDS, but I was wondering if anyone could
help me with creating attributes that can be used by everything.

I would like to have every record contain a uuid attribute. How would
I go about creating a UUID attribute and making it "useable" by all
objectclasses?

Any help is greatly appreciated. Thanks!

- Kevin

Re: Adding universal attributes

Posted by Kevin Hamilton <kh...@umem.org>.
Bingo! That was it. I changed the Syntax OID and it worked.

Thanks so much guys! I got it working fine now.

- Kevin

On Wed, Aug 10, 2011 at 12:40 PM, Emmanuel Lecharny <el...@gmail.com> wrote:
> On 8/10/11 6:22 PM, Kevin Hamilton wrote:
>>
>> I get the following error. To me it seems like my entry has an OID, so
>> why is it saying it doesn't?
>
> It does say something interesting :
>
> ERR_04307 The AttributeType cookie-expire must have a syntax OID or a
> superior, it does not have any.]
>
> The important word in this sentence is *syntax*. Your added AttributeType
> might not have one, or does not inherit from an existing AT with a Syntax.
>
>
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
>

Re: Adding universal attributes

Posted by Emmanuel Lecharny <el...@gmail.com>.
On 8/10/11 6:22 PM, Kevin Hamilton wrote:
> I get the following error. To me it seems like my entry has an OID, so
> why is it saying it doesn't?

It does say something interesting :

ERR_04307 The AttributeType cookie-expire must have a syntax OID or a
superior, it does not have any.]

The important word in this sentence is *syntax*. Your added AttributeType might not have one, or does not inherit from an existing AT with a Syntax.



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


Re: Adding universal attributes

Posted by Kevin Hamilton <kh...@umem.org>.
I decided to use the entryUUID. Thanks for all of your help.

I am still, however, having trouble creating new objectClasses.

I get the following error. To me it seems like my entry has an OID, so
why is it saying it doesn't?

!ERROR [LDAP: error code 53 - UNWILLING_TO_PERFORM: failed for
MessageType : ADD_REQUEST Message ID : 149     Add Request : Entry
dn[n]: m-oid=1.23.41.1231234.25324.23342.1234, ou=attributeTypes,
cn=cookie, ou=schema     objectclass: metaAttributeType
objectclass: metaTop     objectclass: top     m-oid:
1.23.41.1231234.25324.23342.1234     m-description: Timestamp of when
cookie will expire     m-name: cookie-expire : ERR_345 Cannot add the
AttributeType m-oid=1.23.41.1231234.25324.23342.1234,
ou=attributeTypes, cn=cookie, ou=schema into the registries, the
resulting registries would be inconsistent :
org.apache.directory.shared.ldap.model.exception.LdapSchemaException:
ERR_04307 The AttributeType cookie-expire must have a syntax OID or a
superior, it does not have any.]

Thanks so much,
Kevin


On Wed, Aug 10, 2011 at 11:52 AM, Pierre-Arnaud Marcelot
<pa...@marcelot.net> wrote:
> On 10 août 2011, at 17:36, Kevin Hamilton wrote:
>
> Editing an entry and adding my object class and the uuid attribute
> worked. But that still doesn't explain why it is not showing up in
> schema browser??
>
> Probably a bug with the schema cache on the Studio side or a bug in the way
> ApacheDS provides its schema via the subSchemaSubentry.
> You can also try to reload the schema using the connection property page:
> http://directory.apache.org/studio/static/users_guide/ldap_browser/tools_connection_properties.html#tools_connection_properties_schema
> Maybe it will work better...
>
> Also, I was wondering if there was a way to make the default entry
> view display the entryUUID attribute?
>
> Nope, we only display attributes containing at least one value.
> Regards,
> Pierre-Arnaud
> PS: Sent a second time to include the list...
> On 10 août 2011, at 17:08, Kevin Hamilton wrote:
>
> I am still having trouble even creating attributes.
>
> I go into schema editor, and I create a new schema called uuid-schema.
> I add an attribute called uuid with my desired properties. I then
> create an auxiliary objectclass called uuid-class. The attributes are
> optional uuid. I think export this as apacheds file. Then I go back to
> my LDAP browser and import LDIF and get the file.
>
> It successfully adds the schema to the ou=schema section in LDAP but I
> cannot view either the object class nor the attribute in the schema
> browser.
>
> Am I doing something wrong? How can I start using this new attribute
> when I can't find it anywhere?
>
> Thanks in advance,
> Kevin
>
> On Wed, Aug 10, 2011 at 10:31 AM, Pierre-Arnaud Marcelot
> <pa...@marcelot.net> wrote:
>
> Hi Kevin,
>
> How about defining an auxiliary object class which contains this UUID
> attribute (either as a mandatory or optional attribute type)?
>
> This would allow you to add the UUID attribute to any entry (after adding
> the new object class to the 'objectClass' attribute of the entry of course).
>
> This way you don't have to modify any existing class hierarchy.
>
> Hope this helps,
>
> Pierre-Arnaud
>
> On 10 août 2011, at 16:23, Kevin Hamilton wrote:
>
> Hello everyone,
>
> I am somewhat new to ApacheDS, but I was wondering if anyone could
>
> help me with creating attributes that can be used by everything.
>
> I would like to have every record contain a uuid attribute. How would
>
> I go about creating a UUID attribute and making it "useable" by all
>
> objectclasses?
>
> Any help is greatly appreciated. Thanks!
>
> - Kevin
>
>
>
>

Re: Adding universal attributes

Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
On 10 août 2011, at 17:36, Kevin Hamilton wrote:
> Editing an entry and adding my object class and the uuid attribute
> worked. But that still doesn't explain why it is not showing up in
> schema browser??

Probably a bug with the schema cache on the Studio side or a bug in the way ApacheDS provides its schema via the subSchemaSubentry.
You can also try to reload the schema using the connection property page:
http://directory.apache.org/studio/static/users_guide/ldap_browser/tools_connection_properties.html#tools_connection_properties_schema
Maybe it will work better...

> Also, I was wondering if there was a way to make the default entry
> view display the entryUUID attribute?

Nope, we only display attributes containing at least one value.

Regards,
Pierre-Arnaud

PS: Sent a second time to include the list...

On 10 août 2011, at 17:08, Kevin Hamilton wrote:

> I am still having trouble even creating attributes.
> 
> I go into schema editor, and I create a new schema called uuid-schema.
> I add an attribute called uuid with my desired properties. I then
> create an auxiliary objectclass called uuid-class. The attributes are
> optional uuid. I think export this as apacheds file. Then I go back to
> my LDAP browser and import LDIF and get the file.
> 
> It successfully adds the schema to the ou=schema section in LDAP but I
> cannot view either the object class nor the attribute in the schema
> browser.
> 
> Am I doing something wrong? How can I start using this new attribute
> when I can't find it anywhere?
> 
> Thanks in advance,
> Kevin
> 
> On Wed, Aug 10, 2011 at 10:31 AM, Pierre-Arnaud Marcelot
> <pa...@marcelot.net> wrote:
>> Hi Kevin,
>> 
>> How about defining an auxiliary object class which contains this UUID attribute (either as a mandatory or optional attribute type)?
>> 
>> This would allow you to add the UUID attribute to any entry (after adding the new object class to the 'objectClass' attribute of the entry of course).
>> 
>> This way you don't have to modify any existing class hierarchy.
>> 
>> Hope this helps,
>> Pierre-Arnaud
>> 
>> On 10 août 2011, at 16:23, Kevin Hamilton wrote:
>> 
>>> Hello everyone,
>>> 
>>> I am somewhat new to ApacheDS, but I was wondering if anyone could
>>> help me with creating attributes that can be used by everything.
>>> 
>>> I would like to have every record contain a uuid attribute. How would
>>> I go about creating a UUID attribute and making it "useable" by all
>>> objectclasses?
>>> 
>>> Any help is greatly appreciated. Thanks!
>>> 
>>> - Kevin
>> 
>> 


Re: Adding universal attributes

Posted by Kevin Hamilton <kh...@umem.org>.
I am still having trouble even creating attributes.

I go into schema editor, and I create a new schema called uuid-schema.
I add an attribute called uuid with my desired properties. I then
create an auxiliary objectclass called uuid-class. The attributes are
optional uuid. I think export this as apacheds file. Then I go back to
my LDAP browser and import LDIF and get the file.

It successfully adds the schema to the ou=schema section in LDAP but I
cannot view either the object class nor the attribute in the schema
browser.

Am I doing something wrong? How can I start using this new attribute
when I can't find it anywhere?

Thanks in advance,
Kevin

On Wed, Aug 10, 2011 at 10:31 AM, Pierre-Arnaud Marcelot
<pa...@marcelot.net> wrote:
> Hi Kevin,
>
> How about defining an auxiliary object class which contains this UUID attribute (either as a mandatory or optional attribute type)?
>
> This would allow you to add the UUID attribute to any entry (after adding the new object class to the 'objectClass' attribute of the entry of course).
>
> This way you don't have to modify any existing class hierarchy.
>
> Hope this helps,
> Pierre-Arnaud
>
> On 10 août 2011, at 16:23, Kevin Hamilton wrote:
>
>> Hello everyone,
>>
>> I am somewhat new to ApacheDS, but I was wondering if anyone could
>> help me with creating attributes that can be used by everything.
>>
>> I would like to have every record contain a uuid attribute. How would
>> I go about creating a UUID attribute and making it "useable" by all
>> objectclasses?
>>
>> Any help is greatly appreciated. Thanks!
>>
>> - Kevin
>
>

Re: Adding universal attributes

Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
Hi Kevin,

How about defining an auxiliary object class which contains this UUID attribute (either as a mandatory or optional attribute type)?

This would allow you to add the UUID attribute to any entry (after adding the new object class to the 'objectClass' attribute of the entry of course).

This way you don't have to modify any existing class hierarchy.

Hope this helps,
Pierre-Arnaud

On 10 août 2011, at 16:23, Kevin Hamilton wrote:

> Hello everyone,
> 
> I am somewhat new to ApacheDS, but I was wondering if anyone could
> help me with creating attributes that can be used by everything.
> 
> I would like to have every record contain a uuid attribute. How would
> I go about creating a UUID attribute and making it "useable" by all
> objectclasses?
> 
> Any help is greatly appreciated. Thanks!
> 
> - Kevin


Re: Adding universal attributes

Posted by Kiran Ayyagari <ka...@apache.org>.
no need to add, by default there is a UUID attribute added to each
entry, the name of the attribute is 'entryUUID'

On Wed, Aug 10, 2011 at 7:53 PM, Kevin Hamilton <kh...@umem.org> wrote:
> Hello everyone,
>
> I am somewhat new to ApacheDS, but I was wondering if anyone could
> help me with creating attributes that can be used by everything.
>
> I would like to have every record contain a uuid attribute. How would
> I go about creating a UUID attribute and making it "useable" by all
> objectclasses?
>
> Any help is greatly appreciated. Thanks!
>
> - Kevin
>



-- 
Kiran Ayyagari

Re: Adding universal attributes

Posted by Emmanuel Lecharny <el...@gmail.com>.
On 8/10/11 4:23 PM, Kevin Hamilton wrote:
> Hello everyone,
>
> I am somewhat new to ApacheDS, but I was wondering if anyone could
> help me with creating attributes that can be used by everything.
Define 'everything'...
>
> I would like to have every record contain a uuid attribute.
It's already the case. Every entry has an entryUUID attribute, but as 
it's an operational attribute, you won't see it unless you request it 
explicitely (add the 'entryUUID' attribute in the list of attributes you 
want to get back when doing a search)
>   How would
> I go about creating a UUID attribute and making it "useable" by all
> objectclasses?
>
> Any help is greatly appreciated. Thanks!
I hope it helped.


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