Announcement Announcement Module
Collapse
No announcement yet.
Retrieve OctetString attribute with DirContextAdapter causes class cast exception Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Retrieve OctetString attribute with DirContextAdapter causes class cast exception

    Hi,

    When using Sun Directory Server, retrieving an OctetString (such as a hashed password) attribute using DirContextAdapter.getStringAttribute() causes a class cast exception. This is because OctetString are in fact returned as byte[].

    I worked around this by extending DirContextAdapter and adding a [ExtendedDirContextAdapter].getOctetStringAttribute() method. . . . at least this is what I'm about to do Perhaps this is a bit sucky.

    Maybe DirContextAdapter could support different attribute types (GeneralizedTime, DirectoryString, OctetString, etc) ?

    Thanks,
    Jasper

  • #2
    Oops: Found getObjectAttribute.

    Excuse me.
    Thanks.

    Comment

    Working...
    X