directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@apache.org>
Subject Re: How to bind and search binary data in Apache DS?
Date Mon, 02 Mar 2009 18:39:24 GMT
Sudheer Kumar wrote:
>> [Sudheer] I don't really want to do this. What I want is able to store
>> large Strings.  As String type has a limitation of 64K
>> There are no limitation on String size in Java. You'll will only get a
>> OOM if it's too big for your JVM
>>     
>
> [Sudheer]It seems there is a limit on the size of String that LDAP
> supports (I guess it is 64KB). Try saving a large String (more than 64
> KB) to an attribute whose type is String. ADS will throw and exception
> similar to the following:
>   
Ok, this is a clear bug in the server. I'm able to reproduce it.

It fails because we are using the default serialization for String, 
which does not allow String above 65535 chars :

    void writeUTF(String s, long utflen) throws IOException {
        if (utflen > 0xFFFFL) {
            throw new UTFDataFormatException();
        }
        ...

Can you fill a JIRA for this bug ?


-- 
--
cordialement, regards,
Emmanuel L├ęcharny
www.iktek.com
directory.apache.org



Mime
View raw message