Keesjan van Bunningen wrote:
Hi,
I installed ApacheDS and loaded my custom schema as explained here: http://cwiki.apache.org/DIRxSRVx10/custom-schema.html.
Currently, I'm trying to do an import by ldif file, but this fails due to an unknown attributeType entryUUID (http://www.ietf.org/rfc/rfc4530.txt).
Unfortunately, when trying to add this attributeType to my schema the parsing fails, because I'm still missing the required matching rules used by the attributeType.
I'm at a loss how to resolve this issue and was wondering whether there's actually a readily available schema out there that contains the entryUUID attributeType?
If not, how do you declare a matching rule (and matching rule use) entity in your schema (including any additional dependencies) ?
We've added entryUUID by default in the 1.5 branch to the apache schema.
This will always be in entries starting from 1.5 and up. It's needed
for replication and other things.
You can add matchingRules for it easily. Just take the matching rule
producers generated by the schema plugin for your custom schema and add
the MR to it programatically. Look at other MatchingRuleProducers that
are in the core here like this one to see how:
http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/schema/bootstrap/SystemMatchingRuleProducer.java?revision=434579&view=markup
Note that if you take the generated class in target/generated-sources
and copy it into the src/main/java/path-to-package directory it will no
longer be generated by the schema plugin.
This is because the schema plugin will check if you have a customized
producer and not overwrite or try to replace it with an empty one.
You will need to add a Comparator and a Normalizer for your new matching
rule too. See the respective SystemCOmparatorProducer and
SystemNormalizerProducers. These things register comparators and
normalizers for pmatchingRules using the OID of the matchingRule they
are associated with.
HTH,
Alex