directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre-Arnaud Marcelot>
Subject Re: After adding new m-may attribute to a custom class in a schema, can't then add the attribute to an entry
Date Tue, 23 Jul 2013 14:53:45 GMT
Hi Matthew,

Did you restart the server ?

Additions don't need a server-restart and are handled on the fly.
Modifications on an existing schema element, though, are not very recommended (especially
if you already have data using this schema element) and I'm not really sure they are handled
on the fly as well.

On the Studio side, if you've modified the schema without closing/reopening the connection
or manually reloading the schema (in the connection's properties or in the Schema view), the
modification won't be reflected, hence the message you got.
A simple "close/reopen" of the connection should "fix" that.


On 23 juil. 2013, at 16:39, Matthew Goudge <> wrote:

> Hi,
> I’m having odd issues with adding a new m-may attribute to a custom metaObjectClass
in our schema.  We created a custom class in the initial release of the software with the
following ldif:
> dn: m-oid=, ou=objectClasses, cn=conneqt-config, ou=schema
> objectclass: metaObjectClass
> objectclass: metaTop
> objectclass: top
> m-oid:
> m-name: adapterMailbox
> m-supObjectClass: top
> m-must: email
> m-must: smtpHost
> m-must: smtpPort
> m-must: userPassword
> Further changes then required the addition of an optional enabled/disabled flag, so the
following update ldif was created:
> dn: m-oid=, ou=attributeTypes, cn=conneqt-config, ou=schema
> objectclass: metaAttributeType
> objectclass: metaTop
> objectclass: top
> m-oid:
> m-name: isActiveFlag
> m-description: A boolean flag to indicate if an entry is active or not
> m-equality: caseIgnoreMatch
> m-ordering: booleanMatch
> m-syntax:
> m-length: 1
> m-singleValue: TRUE
> dn: m-oid=, ou=objectClasses, cn=conneqt-config, ou=schema
> changetype: modify
> add: m-may
> m-may: isActiveFlag
> Now the problems I have are two-fold: firstly, when I try to add the isActiveFlag attribute
to an entry through Apache Directory Studio, it gives a warning saying the attribute type
is not allowed.  Whilst I can click through this, the second problem is that when I try to
add entries programmatically:
> var name = string.Format("email={0}", emailAddress);
> var entry = container.Children.Add(name, "adapterMailbox");
> entry.Properties["userPassword"].Value = password;
> entry.Properties["smtpHost"].Value = smtpHost;
> entry.Properties["smtpPort"].Value = smtpPort;
> entry.Properties["isActiveFlag"].Value = isActiveFlag;
> entry.CommitChanges();
> It is throwing a DirectoryServicesCOMException with message “The requested operation
did not satisfy one or more constraints associated with the class of the object.”
> Anyone able to shed any light on what might be going on?
> Cheers
> Matthew Goudge
> Developer
> <image001.gif>
> Quicksilva Systems Integration Solutions |
> Tel: 01249 751 000 |
> <image002.gif><image003.gif><image004.gif>
> ______________________________________________________________________
> The Company gives no warranty as to the accuracy or completeness of electronic mail messages
sent over the Internet and accepts no responsibility for changes made after it was sent. Any
opinion expressed in this email may be personal to the author, may not necessarily reflect
the opinions of the Company or its affiliates and may be subject to change without notice.

> The information contained in this communication is confidential and/or proprietary business
or technical data. If you are not the intended recipient, you are hereby notified that any
dissemination, copying or distribution of this communication, or the taking of any action
in reliance on the contents of this communication, is strictly prohibited. If you have received
this communication in error, please immediately notify us electronically by return message,
and delete or destroy all copies of this communication.
> Quicksilva Limited, Reg No 3860799, Incorporated at Companies House, Cardiff.
> Registered Office: Langley Gate, Swindon Road, Chippenham, Wiltshire, SN15 5SE. Vat Reg
No 762 8082 16. 
> ______________________________________________________________________
> This email has been scanned by the Symantec Email service.
> For more information please visit
> ______________________________________________________________________

View raw message