directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ole Ersoy <ole.er...@gmail.com>
Subject Re: [jira] Commented: (DIRSERVER-935) Test hangs on non-existant schema entry lookup
Date Sun, 20 May 2007 00:53:52 GMT
More Piggy Backing.

I think I may know why the
last piggy back gets a schema violation.

When I created the attributes
for the Syntax container I did it like this:

         Attribute objectClassAttribute = new BasicAttribute(
             "objectClass",
             "top");

         Attribute metaSchemaAttribute = new BasicAttribute(
             "objectClass",
             "metaSchema");

When I should have done it like this:

Attribute objectClassAttribute = new BasicAttribute(
      "objectClass",
      "top");

objectClassAttribute.add("metaSchema");

When I ran the original test,
this seemed to all work fine,
from visual inspection in LS.

I saw the object classes appear
on the ou=syntaxes entry, just as
they are listed on other ADS syntax entries
that I used as examples.

Should that be the case?
I'm thinking an exception saying
that I'm trying to add multiple objectClass
attributes should have been thrown.

It should really say "Ole, you are doing
your thing again" because I'm the only
one who would try this.  Everyone else
would do it the right way.

Now that I fixed the test, I'm getting
SchemaViolation exceptions because
I'm not providing the m-name attribute that
is required by the schema, which is good.

OK - back to tinkering.

Cheers,
- Ole








Ole Ersoy (JIRA) wrote:
>     [ https://issues.apache.org/jira/browse/DIRSERVER-935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12497068
] 
> 
> Ole Ersoy commented on DIRSERVER-935:
> -------------------------------------
> 
> OK - I'm picking backing on this bug,
> since this observation uses the same test code,
> although this is likely a different bug.
> 
> If I add
> attributes.put( "m-name", "hello" );
> 
> to the attributes of the syntax entry,
> and try to run the test again, I get:
> 
> javax.naming.directory.SchemaViolationException: [LDAP: error code 65 - failed to add
entry m-oid=1.3.6.1.4.1.18060.0.4.0.0.100000.233.1233,ou=syntaxes,cn=xsd,ou=schema: Attribute
m-name not declared in objectClasses of entry m-oid=1.3.6.1.4.1.18060.0.4.0.0.100000.233.1233,ou=syntaxes,cn=xsd,ou=schema];
remaining name 'm-oid=1.3.6.1.4.1.18060.0.4.0.0.100000.233.1233'
> 	at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3036)
> 	at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2951)
> 	at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2758)
> 	at com.sun.jndi.ldap.LdapCtx.c_createSubcontext(LdapCtx.java:774)
> 
> Even though the the ObjectClasses that the syntax entry uses
> are the same as the ObjectClasses on other syntax entries that have
> the m-name attribute.
> 
> 
>> Test hangs on non-existant schema entry lookup
>> ----------------------------------------------
>>
>>                 Key: DIRSERVER-935
>>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-935
>>             Project: Directory ApacheDS
>>          Issue Type: Bug
>>          Components: ldap
>>    Affects Versions: 1.5.1
>>            Reporter: Ole Ersoy
>>            Priority: Minor
>>             Fix For: pre-2.0
>>
>>         Attachments: CreateSyntaxEntrySelfContainedTest.java
>>
>>
>> Hey Guys,
>> I do a lookup like this inside a test:
>>         syntaxContext.lookup(xsdSyntaxStringRDN);
>> //      syntaxContext.lookup("monkeywrench");
>> If I leave the monkeywrench lookup commented
>> out, the test runs fine repeatedly.
>> If I comment in the monkeywrench the
>> test just hangs.  I was expecting
>> a NamingException.
>> I pasted a self contained test for this
>> below.
>> Cheers,
>> - Ole
> 

Mime
View raw message