You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by Michael Decker <M....@tesis.de> on 2007/08/02 11:15:11 UTC
[ApacheDS] 1.5 / Dynamic Scheme Loading / Subclassing
Hello,
I'm starting to use ApacheDS 1.5 as developer ldap server, so every developer
can use his own server.
So we've our own ldap schema. It seems, that if I load a new scheme into
ApacheDS 1.5 it can't resolve super class relations until I've restart my
ApacheDS
My objectclass A is a subclass of inetOrgPerson, that of organizationalPerson
and that of person. So after loading the schema (via ldif-Directory on
startup) I try to add an new entry via ldif and get this:
--- SNIP ---
#!ERROR [LDAP: error code 65 - failed to add entry
myuid=myuser,ou=Users,dc=mydomain,dc=de: Attribute sn not declared in
objectClasses of entry myuid=myuser,ou=Users,dc=mydomain,dc=de]
--- SNAP ---
But sn is declared in object class person.
If I stop my server and restart it, I can import my ldif and this enty will be
created.
Must I really restart ApacheDS 1.5 everytime after creating or modificating a
schema? Or is there another way?
Thanks a lot.
With regards,
Michael Decker
--
Michael Decker M.Decker@tesis.de
TESIS SYSware GmbH http://www.tesis.de
Baierbrunner Str. 15 * 81379 Muenchen * Tel. +49 89 747377-52
Geschäftsführung: Dipl.-Math. Gerhard Zipf,
Dipl.-Math. Alfons Weber
Sitz und Registergericht: München HRB 89277
Re: [ApacheDS] 1.5 / Dynamic Scheme Loading / Subclassing
Posted by Michael Decker <M....@tesis.de>.
Hallo Pierre-Arnaud,
I'm not allowed to post the whole file, but I can give you a lot of pieces:
--- SNIP ---
# mySchema
# Generated by LDAP Studio on July 30, 2007 2:43:50 PM
dn: cn=mySchema, ou=schema
objectclass: metaSchema
objectclass: top
cn: mySchema
m-dependencies: system
m-dependencies: inetorgperson
m-dependencies: core
[...]
dn: ou=objectClasses, cn=mySchema, ou=schema
objectclass: organizationalUnit
objectclass: top
ou: objectClasses
[...]
dn: m-oid=1.2.3.4.5.6.7.8.9, ou=objectClasses, cn=mySchema, ou=
schema
objectclass: metaObjectclass
objectclass: metaTop
objectclass: top
m-oid: 1.2.3.4.5.6.7.8.9
m-name: mySchemaUser
m-description: User
m-supObjectClass: inetOrgPerson
m-supObjectClass: mySchemaBase
m-must: mySchemaUID
--- SNIP ---
Im using the ApacheDS provided with "apacheds-1.5.0-linux-i386-setup.jar".
Eclipse 3.3 with Apache LDAP Studio Schemas Editor Plug-In 0.8.0.
I've converted my old schema into an ApacheDS Studio readable schema. (That
was an hard work, because Studio crashes, if the schema attributes are not in
an exact order :-/ But that is not the topic here).
After this, I've exported it with "Export for ApacheDS..."
It does not matter if I use automatically loading by saving the
Schema-LDIF-File into my ldif-directory or I use Apache LDAB Browser...
I get this error:
--- SNIP ---
#!ERROR [LDAP: error code 65 - failed to add entry
myuid=myuser,ou=Users,dc=mydomain,dc=de: Attribute sn not declared in
objectClasses of entry myuid=myuser,ou=Users,dc=mydomain,dc=de]
--- SNAP ---
If I restart the server after loading schema and try to load my data, there is
no problem.
Any idea?
Thanks a lot,
Michael Decker
--
Michael Decker M.Decker@tesis.de
TESIS SYSware GmbH http://www.tesis.de
Baierbrunner Str. 15 * 81379 Muenchen * Tel. +49 89 747377-52
Geschäftsführung: Dipl.-Math. Gerhard Zipf,
Dipl.-Math. Alfons Weber
Sitz und Registergericht: München HRB 89277
Re: [ApacheDS] 1.5 / Dynamic Scheme Loading / Subclassing
Posted by Michael Decker <M....@tesis.de>.
Hi Pierre-Arnaud,
I'm confused. I've wrote an little sample to test my reported schema problem.
And this test works.
I don't understand this... Perhaps I can figure out, what the difference is.
Here the sample data...
Schema:
--- SNIP ---
# mytest
# Generated by LDAP Studio on August 3, 2007 10:59:46 AM
dn: cn=mytest, ou=schema
objectclass: metaSchema
objectclass: top
cn: mytest
m-dependencies: system
m-dependencies: inetorgperson
dn: ou=attributeTypes, cn=mytest, ou=schema
objectclass: organizationalUnit
objectclass: top
ou: attributetypes
dn: m-oid=1.3.6.1.4.1.13571.100.99001, ou=attributeTypes, cn=mytest, ou=schema
objectclass: metaAttributeType
objectclass: metaTop
objectclass: top
m-oid: 1.3.6.1.4.1.13571.100.99001
m-name: testAttribute
m-description: My Test Attribute
m-supAttributeType: distinguishedName
m-singleValue: TRUE
dn: m-oid=1.3.6.1.4.1.13571.100.99005, ou=attributeTypes, cn=mytest, ou=schema
objectclass: metaAttributeType
objectclass: metaTop
objectclass: top
m-oid: 1.3.6.1.4.1.13571.100.99005
m-name: testAttributesecond
m-equality: caseIgnoreMatch
m-ordering: caseIgnoreOrderingMatch
m-substr: caseIgnoreSubstringsMatch
m-syntax: 1.3.6.1.4.1.1466.115.121.1.15
dn: ou=comparators, cn=mytest, ou=schema
objectclass: organizationalUnit
objectclass: top
ou: comparators
dn: ou=ditContentRules, cn=mytest, ou=schema
objectclass: organizationalUnit
objectclass: top
ou: ditcontentrules
dn: ou=ditStructureRules, cn=mytest, ou=schema
objectclass: organizationalUnit
objectclass: top
ou: ditstructurerules
dn: ou=matchingRules, cn=mytest, ou=schema
objectclass: organizationalUnit
objectclass: top
ou: matchingrules
dn: ou=matchingRuleUse, cn=mytest, ou=schema
objectclass: organizationalUnit
objectclass: top
ou: matchingruleuse
dn: ou=nameForms, cn=mytest, ou=schema
objectclass: organizationalUnit
objectclass: top
ou: nameforms
dn: ou=normalizers, cn=mytest, ou=schema
objectclass: organizationalUnit
objectclass: top
ou: normalizers
dn: ou=objectClasses, cn=mytest, ou=schema
objectclass: organizationalUnit
objectclass: top
ou: objectClasses
dn: m-oid=1.3.6.1.4.1.13571.100.99004, ou=objectClasses, cn=mytest, ou=schema
objectclass: metaObjectclass
objectclass: metaTop
objectclass: top
m-oid: 1.3.6.1.4.1.13571.100.99004
m-name: testObjectSecond
m-supObjectClass: inetOrgPerson
m-must: testAttributesecond
dn: m-oid=1.3.6.1.4.1.13571.100.99003, ou=objectClasses, cn=mytest, ou=schema
objectclass: metaObjectclass
objectclass: metaTop
objectclass: top
m-oid: 1.3.6.1.4.1.13571.100.99003
m-name: testSupObject
m-description: Test Super Class;type=base
m-typeObjectClass: ABSTRACT
m-must: cn
dn: m-oid=1.3.6.1.4.1.13571.100.99002, ou=objectClasses, cn=mytest, ou=schema
objectclass: metaObjectclass
objectclass: metaTop
objectclass: top
m-oid: 1.3.6.1.4.1.13571.100.99002
m-name: testObject
m-description: Test Class 1
m-supObjectClass: testSupObject
m-must: testAttribute
dn: ou=syntaxCheckers, cn=mytest, ou=schema
objectclass: organizationalUnit
objectclass: top
ou: syntaxcheckers
dn: ou=syntaxes, cn=mytest, ou=schema
objectclass: organizationalUnit
objectclass: top
ou: syntaxes
--- SNAP ---
Data:
--- SNIP ---
dn: ou=mytestdata+description=Folder saving same test data,dc=example,dc=com
objectClass: organizationalUnit
objectClass: top
description: Folder saving same test data
ou: mytestdata
dn: cn=entry01+testAttribute=some data....,ou=mytestdata+description=Folder
saving same test data,dc=example,dc=com
objectClass: testObject
objectClass: testSupObject
objectClass: top
cn: entry01
testattribute: some data....
dn: cn=entry02+sn=SN+testattributesecond=Some information,ou=mytestdata+des
cription=Folder saving same test data,dc=example,dc=com
objectClass: organizationalPerson
objectClass: person
objectClass: inetOrgPerson
objectClass: testObjectSecond
objectClass: top
cn: entry02
sn: SN
testattributesecond: Some information
--- SNAP ---
Regards,
Michael Decker
--
Michael Decker M.Decker@tesis.de
TESIS SYSware GmbH http://www.tesis.de
Baierbrunner Str. 15 * 81379 Muenchen * Tel. +49 89 747377-52
Geschäftsführung: Dipl.-Math. Gerhard Zipf,
Dipl.-Math. Alfons Weber
Sitz und Registergericht: München HRB 89277
Re: [ApacheDS] 1.5 / Dynamic Scheme Loading / Subclassing
Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
Hi Michael,
How did you generate the LDIF from your own schema ? Is it with Apache LDAP
Studio ( Apache Directory Studio) ?
If not, there might be a lack of dependency information in the LDIF (
something like "m-dependencies: inetorgperson" as far as I remember ).
Could you please post the LDIF corresponding to your schema ?
Thanks,
Pierre-Arnaud Marcelot
On 8/2/07, Michael Decker <M....@tesis.de> wrote:
>
> Hello,
>
> I'm starting to use ApacheDS 1.5 as developer ldap server, so every
> developer
> can use his own server.
>
> So we've our own ldap schema. It seems, that if I load a new scheme into
> ApacheDS 1.5 it can't resolve super class relations until I've restart my
> ApacheDS
>
> My objectclass A is a subclass of inetOrgPerson, that of
> organizationalPerson
> and that of person. So after loading the schema (via ldif-Directory on
> startup) I try to add an new entry via ldif and get this:
> --- SNIP ---
> #!ERROR [LDAP: error code 65 - failed to add entry
> myuid=myuser,ou=Users,dc=mydomain,dc=de: Attribute sn not declared in
> objectClasses of entry myuid=myuser,ou=Users,dc=mydomain,dc=de]
> --- SNAP ---
> But sn is declared in object class person.
>
> If I stop my server and restart it, I can import my ldif and this enty
> will be
> created.
>
> Must I really restart ApacheDS 1.5 everytime after creating or
> modificating a
> schema? Or is there another way?
>
> Thanks a lot.
>
> With regards,
> Michael Decker
> --
> Michael Decker M.Decker@tesis.de
> TESIS SYSware GmbH http://www.tesis.de
> Baierbrunner Str. 15 * 81379 Muenchen * Tel. +49 89 747377-52
>
> Geschäftsführung: Dipl.-Math. Gerhard Zipf,
> Dipl.-Math. Alfons Weber
> Sitz und Registergericht: München HRB 89277
>
>