You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Rajesh <ra...@vimukti.com> on 2011/04/24 13:46:47 UTC
Custom Schema
I have been trying to start the server with a custom schema of my own since
last one week. In that process I am trying to understand how the schema
gets loaded. I found a small bug in that process.
DefaultSchema.addDependencies method is implemented wrong. The src, dst for
arraycopy should be interchanged.
After I loaded my schema I got error in the following line in
DefaultPartitionNexus constructor.
rootDSE.put( SchemaConstants.SUBSCHEMA_SUBENTRY_AT,
ServerDNConstants.CN_SCHEMA_DN );
ERR_04464 Error while adding values into the {0} attribute. Error :
ERR_04269 ATTRIBUTE_TYPE for OID subschemasubentry does not exist!
I understand the error that my schema does not define this AttributeType.
But what I did not understand is why "subschemasubentry" is being treated as
OID. In some places there are checks like OID.isOid to make sure that all
OIDs of all AttributeTypes are really OIDs. And in many other places names
are being used as OIDs.
I got little confused. Can some one clear my doubts...
Thanks in advance
--
Rajesh Akkineni
Re: Custom Schema
Posted by Kiran Ayyagari <ka...@apache.org>.
do you have a test case to reproduce the error you are encountering?
that will help us to understand your issue better
On Sun, Apr 24, 2011 at 5:16 PM, Rajesh <ra...@vimukti.com> wrote:
> I have been trying to start the server with a custom schema of my own since
> last one week. In that process I am trying to understand how the schema
> gets loaded. I found a small bug in that process.
>
> DefaultSchema.addDependencies method is implemented wrong. The src, dst for
> arraycopy should be interchanged.
>
> After I loaded my schema I got error in the following line in
> DefaultPartitionNexus constructor.
>
> rootDSE.put( SchemaConstants.SUBSCHEMA_SUBENTRY_AT,
> ServerDNConstants.CN_SCHEMA_DN );
>
>
> ERR_04464 Error while adding values into the {0} attribute. Error :
> ERR_04269 ATTRIBUTE_TYPE for OID subschemasubentry does not exist!
>
> I understand the error that my schema does not define this AttributeType.
> But what I did not understand is why "subschemasubentry" is being treated as
> OID. In some places there are checks like OID.isOid to make sure that all
> OIDs of all AttributeTypes are really OIDs. And in many other places names
> are being used as OIDs.
>
> I got little confused. Can some one clear my doubts...
>
> Thanks in advance
>
> --
>
> Rajesh Akkineni
>
>
--
Kiran Ayyagari
Re: Custom Schema
Posted by Emmanuel Lecharny <el...@gmail.com>.
On 4/24/11 1:46 PM, Rajesh wrote:
> I have been trying to start the server with a custom schema of my own since
> last one week. In that process I am trying to understand how the schema
> gets loaded. I found a small bug in that process.
If you think you found a bug, then you should create a JIRA.
> DefaultSchema.addDependencies method is implemented wrong. The src, dst for
> arraycopy should be interchanged.
Nope. src come first, then destination. Check the System.arraycopy javadoc.
> After I loaded my schema I got error in the following line in
> DefaultPartitionNexus constructor.
>
> rootDSE.put( SchemaConstants.SUBSCHEMA_SUBENTRY_AT,
> ServerDNConstants.CN_SCHEMA_DN );
Why would you do that ???
RootDSE is *not meant* to be modified in any way by a user.
> ERR_04464 Error while adding values into the {0} attribute. Error :
> ERR_04269 ATTRIBUTE_TYPE for OID subschemasubentry does not exist!
>
> I understand the error that my schema does not define this AttributeType.
> But what I did not understand is why "subschemasubentry" is being treated as
> OID.
What's the problem here ? Just the message giving incorrect
informations. Now, it's difficult to tell exactly why you've got such a
message without the code you wrote.
> In some places there are checks like OID.isOid to make sure that all
> OIDs of all AttributeTypes are really OIDs. And in many other places names
> are being used as OIDs.
Every AT *must* have an OID.
> I got little confused. Can some one clear my doubts...
At this point, the best is o explain exactly what you are trying to do,
instead of diving into a code which is complex and try to figure out
what can be wrong in the existing code. It's more likely that you are
doing something wrong than we have done something wrong.
Also it would be great if you can provide :
- the code you are using
- the version of the server you are using.
Thanks.
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com