You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Kiran Ayyagari (JIRA)" <ji...@apache.org> on 2014/03/11 10:22:43 UTC

[jira] [Commented] (DIRAPI-177) Attribute.getBytes() can't get value when the Attribute is "objectSid" or "objectGUID"

    [ https://issues.apache.org/jira/browse/DIRAPI-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13930110#comment-13930110 ] 

Kiran Ayyagari commented on DIRAPI-177:
---------------------------------------

The fix for this is to:
1. create an instance of DefaultConfigurableBinaryAttributeDetector
2. add the "objectSid" and "objectGUID" attributes by calling addBinaryAttribute()
3. set the above created binary attribute detector in the LdapNetworkConnection instance by calling setBinaryAttributeDetector() 



> Attribute.getBytes() can't get value when the Attribute is "objectSid" or "objectGUID"
> --------------------------------------------------------------------------------------
>
>                 Key: DIRAPI-177
>                 URL: https://issues.apache.org/jira/browse/DIRAPI-177
>             Project: Directory Client API
>          Issue Type: Bug
>    Affects Versions: 1.0.0-M20
>            Reporter: Robert Hou
>
> "objectSid" and "objectGUID" two attributes are defined by MS AD, as far as i know, the value of them are binary data. When we use  Attribute.getBytes() to get value of them after Search operation, the exception LdapInvalidAttributeValueException will be thrown, but Attribute.get().getBytes() can success. However,the value of Attribute.get().getBytes() still seems not a correct data, after it was convert to string with specific arithmetic, it is different with correct value.



--
This message was sent by Atlassian JIRA
(v6.2#6252)