Hi all,

I have some Java code that is attempting to read the schema of returned LDAP 
attributes from a 389ds server in an effort to work out what object to parse 
the attribute as. This is being done generically, I don’t know the data types I 
will be getting in the search result.

String numericoid = at.getAttributeSyntaxDefinition()
        .getAttributes("").get("numericoid").get()
        .toString();

The above code is throwing a javax.naming.NameNotFoundException inside the 
getAttributeSyntaxDefinition() call:

javax.naming.NameNotFoundException: 1.3.6.1.4.1.1466.115.121.1.15{256}
        at 
com.sun.jndi.toolkit.dir.HierMemDirCtx.doLookup(HierMemDirCtx.java:127)
        at 
com.sun.jndi.toolkit.dir.HierMemDirCtx.doLookup(HierMemDirCtx.java:121)
        at com.sun.jndi.toolkit.dir.HierMemDirCtx.lookup(HierMemDirCtx.java:95)
        at com.sun.jndi.toolkit.dir.HierMemDirCtx.lookup(HierMemDirCtx.java:91)
        at 
com.sun.jndi.ldap.LdapAttribute.getAttributeSyntaxDefinition(LdapAttribute.java:199)

The suspicious bit is the {256} at the end, which as I understand is a length 
limitation (?), and I suspect this extra bit is causing the syntax lookup to 
fail. 1.3.6.1.4.1.1466.115.121.1.15 is DirectoryString, and I would definitely 
expect that to be valid syntax.

Am I doing this correctly, or does 389DS and JDK8 not see eye to eye on the 
getAttributeSyntaxDefinition() call?

Can anyone confirm whether I am making any obvious mistakes?

Regards,
Graham
—

--
389 users mailing list
389-us...@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/389-users

Reply via email to