directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <>
Subject [jira] Resolved: (DIRSERVER-658) ClassCast exception when fetching DNs from root DES
Date Sat, 01 Jul 2006 23:50:30 GMT
     [ ]
Emmanuel Lecharny resolved DIRSERVER-658:

    Resolution: Fixed

Fixed by modifiying the way NamingContexts are stored in the Attribute object : they are now
stored as String, not as LdapDN objects.

Regression tests passed ok.

> ClassCast exception when fetching DNs from root DES
> ---------------------------------------------------
>          Key: DIRSERVER-658
>          URL:
>      Project: Directory ApacheDS
>         Type: Bug

>     Versions: 1.0-RC4
>     Reporter: Emmanuel Lecharny
>     Assignee: Emmanuel Lecharny

> When fetching for DNs in LdapBrowser, you get an exception while encoding the SearchResultEntry
> ...
> Caused by: java.lang.ClassCastException:
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at org.apache.mina.filter.codec.asn1.Asn1CodecEncoder.encode(
> 	at org.apache.mina.filter.codec.ProtocolCodecFilter.filterWrite(
> ... 22 more
> The problem is that when encoding a SearchResultEntry, the values are supposed to be
Strings or byte arrays, not LdapDNs. When you fetch for DNs in the root DSE, the result is
stored in the SearchResultEntry as LdapDN objects, not Strings, and it's allowad, as the method
which set the value accept an Object.
> We have to fix two problems :
> - first, check that the Object is either a String or a byte[], nothing else (defensive
> - second, avoid storing LdapDN objects where String or byte[] are expected :)

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message