OK -
I fixed objectClass attribute
used to create a syntax entry
so that it looks like this:
Attribute objectClassAttribute = new BasicAttribute(
"objectClass",
"metaSyntax" );
objectClassAttribute.add( "metaTop" );
objectClassAttribute.add( "top" );
Then I try to add a "m-name" attribute,
because I see that the syntax entry
m-oid=1.3.6.1.4.1.1466.115.121.1.10,ou=syntaxes,cn=system,ou=schema
has an "m-name" attribute
with value "Certificate Pair", so
it seems reasonable that I add one too.
However I get a:
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];
So I go to check the ObjectClasses
top, metaTop, and metaSyntax
to see whether any of them have the AttributeType
"m-name".
Seems like it is excluded from that set.
Maybe it's not supposed to be added for user
defined syntax entries?
The attributes "x-humanReadible", "m-obsolete"
are rejected by the schema checking as well,
although these are also present on other syntax
entries.
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