[jira] Commented: (DIRSERVER-948) Possibly a Bug - See Descrption
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache Directory Project > [jira] Commented: (DIRSERVER-948) Possibly a Bug - See Descrption




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    [jira] Commented: (DIRSERVER-948) Possibly a Bug - See Descrption  
Ole Ersoy (JIRA)


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-31-07 12:11 AM


[ https://issues.apache.org/jira/brow...action_12500246 ]

Ole Ersoy commented on DIRSERVER-948:
-------------------------------------

OK - Just to make this interesting
I did the following on the parent class:

protected static void create()
{
objectClassAttribute    =
new BasicAttribute(
OBJECT_CLASS, TOP );
/*
objectClassAttribute.add(
META_TOP );
*/
basicAttributes = new BasicAttributes();
//        basicAttributes.put(objectClassAttribute);
//        basicAttributes.put( M_OBSOLETE, LDAP_FALSE );
}


So the only thing the parent class does now is
create the basicAttributes and create the objectClassAttribute.

Then I did this on the child class:

/*
Attribute objectClassAttribute    =
new BasicAttribute(
OBJECT_CLASS,
TOP );
*/

So I"m commenting out this since the parent does it.

Same thing here:

//basicAttributes = new BasicAttributes();

Now I run the test again and get this:
javax.naming.NamingException: [LDAP: error code 80 - failed to add entry
 m-oid=1.3.6.1.4.1.18060.4.53555398.6981025.5310249.7535556.9101525.5452974.
5010152. 55710254,ou=attributeTypes,cn=das,ou=sch
ema: Unexpected exception.];
 remaining name 'm-oid=1.3.6.1.
4.1.18060.4.53555398.6981025.5310249.7535556.9101525.5452974.5010152.5571025
4'

It's the mysterious unexpected exception.

This is getting goooood.



> Possibly a Bug - See Descrption
> -------------------------------
>
>                 Key: DIRSERVER-948
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-948
>             Project: Directory ApacheDS
>          Issue Type: Bug
>         Environment: FC6
>            Reporter: Ole Ersoy
>            Priority: Minor
>
> I'll check the test in that shows this when I
> check in the DAS.
> I have a parent class that does this:
> public abstract class AbstractTypeCreator
> implements
> EnumeratedSchemaAttributeTypeValues,
> SchemaAttributeTypeConstants,
> AttributeTypeConstants,
> SchemaObjectClassConstants,
> ObjectClassConstants,
> DASConstants
> {
>     protected static Attribute objectClassAttribute;
>     protected static Attributes basicAttributes;
>
>     protected static void create()
>     {
>         objectClassAttribute    =
>             new BasicAttribute(
>                 OBJECT_CLASS, TOP );
>
>         objectClassAttribute.add(
>             META_TOP );
>
>         basicAttributes = new BasicAttributes();
>         basicAttributes.put(objectClassAttribute);
>         basicAttributes.put( M_OBSOLETE, LDAP_FALSE );
>     }
> }
> What I want to do is leverage the work in
> this parent class here.  Notice I have
> commented out the
> work that the parent class does.
> package org.apache.tuscany.das.ldap.schema.create;
> import javax.naming.NamingException;
> import javax.naming.directory.Attribute;
> import javax.naming.directory.BasicAttribute;
> import javax.naming.directory.BasicAttributes;
> import javax.naming.directory.DirContext;
> public class MetaTopSDOObjectClassCreator
> extends AbstractTypeCreator
> {
>     public static void create(
>         DirContext attributeTypesContext,
>         DirContext objectClassesContext,
>         String oidPrefix)
>     throws NamingException, Exception
>     {
>         //Here's where we initialize the parent
>         AbstractTypeCreator.create();
>
>         MComplexMayAttributeTypeCreator.create(
>             attributeTypesContext,
>             oidPrefix );
>
>         MComplexMustAttributeTypeCreator.create(
>             attributeTypesContext,
>             oidPrefix );
>
>         /* Commenting out the work that the parent does
>         Attribute objectClassAttribute    =
>             new BasicAttribute(
>                 OBJECT_CLASS,
>                 TOP );
>
>         objectClassAttribute.add(
>             META_TOP );
>             */
>
>         objectClassAttribute.add( META_OBJECT_CLASS );
>
>         //basicAttributes = new BasicAttributes(); parent does this work
>         basicAttributes.put(objectClassAttribute);
> //        basicAttributes.put( M_OBSOLETE, LDAP_FALSE ); parent does this 
work
>         basicAttributes.put( M_MAY,               M_COMPLEX_MAY);
>         basicAttributes.put( M_MAY,               M_COMPLEX_MUST);
>         basicAttributes.put( M_OBSOLETE,          LDAP_FALSE );
>         basicAttributes.put( M_SUP_OBJECT_CLASS,  META_OBJECT_CLASS );
>         basicAttributes.put( M_TYPE_OBJECT_CLASS, STRUCTURAL);
>         basicAttributes.put( M_NAME,              M_META_TOP_SDO_OBJECT_CL
XXX);
>         basicAttributes.put( M_DESCRIPTION,
>             "Meta ObjectClass for all SDO DataObjects" );
>
>         String rdn =
>             ComplexTypeRDNCreator.create(
>                 oidPrefix,
>                 DAS_XSD_NAMESPACE,
>                 M_META_TOP_SDO_OBJECT_CLASS);
>         objectClassesContext.createSubcontext(
>             rdn, basicAttributes );
>     }
> }
> Now when I run the test
> MetaTopSDOObjectClassCreatorTest (I'll check it
> in when I check in the DAS)
> I get this:
> javax.naming.InvalidNameException: m-oid=1.3.6.1.4.1.18060.4.99985052.4991015.9998
535.5410097.9495056.0251549.9857505.52551005.48: [LDAP: error code 64 - failed t
o add entry m-oid=1.3.6.1.4.1.18060.4.99985052.4991015.9998535.5410097.9495056.02515
49.9857
505.52551005.48,ou=objectClasses,cn=das,ou=schema: The parent entry of a attributeType shoul
d have a relative name of ou=attributeTypes.]; remaining name 'm-oid=1.3.6.1.4.1.18060.4.999
85052.4991015.9998535.5410097.9495056.0251549.9857505.52551005.48'
> 	at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2943)
> 	at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2758)
> However if I comment
> the line
> ===================================
> AbstractTypeCreator.create();
> ===================================
> And uncomment these:
> ===================================
> 	Attribute objectClassAttribute    =
>             new BasicAttribute(
>                 OBJECT_CLASS,
>                 TOP );
>
>         objectClassAttribute.add(
>             META_TOP );
>
>         objectClassAttribute.add( META_OBJECT_CLASS );
>
>         basicAttributes = new BasicAttributes();
>         basicAttributes.put(objectClassAttribute);
>         basicAttributes.put( M_OBSOLETE, LDAP_FALSE );
> The same exact test runs fine.
> It seems to me that test should run fine in either case...
> For some reason it now thinks that I'm trying to create
> an AttributeType entry...

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 07:53 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register