I've been unable to retrieve operational attributes using the API.
I think the server is microsoft AD but I'm not sure.

I give more detail about what I'm doing below but my question is simple:
How do I retrieve operational attributes using this API?


Here's my search call:

connection.search(dn, LdapConstants.OBJECT_CLASS_STAR,
SearchScope.OBJECT, SchemaConstants.ALL_ATTRIBUTES_ARRAY);

When I iterate over the results and inspect the attributes of an entry
I don't find the operational attributes.

I was looking at the API code a bit and it seems that operational
attributes are somehow associated with a schema manager so that's the
next thing I tried.  I put this before the search call:

connection.setSchemaManager(new DefaultSchemaManager());

But this fails now with an exception:

2018-02-16 07:18:52,034 WARN  [NioProcessor-1]     - The attribute
'usncreated' cannot be stored-DefaultEntry.<init>330
2018-02-16 07:18:52,034 WARN  [NioProcessor-1]     - ERR_04269
ATTRIBUTE_TYPE for OID usncreated does not
exist!-LdapNetworkConnection.exceptionCaught1973
org.apache.directory.api.ldap.model.exception.LdapNoSuchAttributeException:
ERR_04269 ATTRIBUTE_TYPE for OID usncreated does not exist!
at 
org.apache.directory.api.ldap.model.schema.registries.DefaultAttributeTypeRegistry.lookup(DefaultAttributeTypeRegistry.java:304)
at 
org.apache.directory.api.ldap.model.schema.registries.DefaultAttributeTypeRegistry.lookup(DefaultAttributeTypeRegistry.java:47)
at 
org.apache.directory.api.ldap.schema.manager.impl.DefaultSchemaManager.lookupAttributeTypeRegistry(DefaultSchemaManager.java:1756)
at 
org.apache.directory.api.ldap.model.entry.DefaultEntry.<init>(DefaultEntry.java:318)
at 
org.apache.directory.ldap.client.api.LdapNetworkConnection.messageReceived(LdapNetworkConnection.java:2311)
at 
org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:858)

I've also downloaded Apache Directory Studio and connected to the same
server and enabled the 'Fetch operational attributes while browsing'
feature on the connection.  I can see the operational attributes when
I inspect a DN.  I just can't seem to do it using this API.

Help would be appreciated.
Thanks,
Kevin.

Reply via email to