jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-1563) Data Store: UTFDataFormatException when using large minRecordLength
Date Wed, 30 Apr 2008 08:22:55 GMT

    [ https://issues.apache.org/jira/browse/JCR-1563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12593257#action_12593257

Stefan Guggisberg commented on JCR-1563:

i've stumbled over the same issue a couple of years ago;
i've chosen to serialize the byte[] (as jukka suggests),
see o.a.j.c.persistence.util.Serializer, line 226:

                 * because writeUTF(String) has a size limit of 65k,
                 * Strings are serialized as <length><byte[]>
                //out.writeUTF(val.toString());   // value
                byte[] bytes = val.toString().getBytes(ENCODING);
                out.writeInt(bytes.length); // lenght of byte[]
                out.write(bytes);   // byte[]

> Data Store: UTFDataFormatException when using large minRecordLength
> -------------------------------------------------------------------
>                 Key: JCR-1563
>                 URL: https://issues.apache.org/jira/browse/JCR-1563
>             Project: Jackrabbit
>          Issue Type: Bug
>            Reporter: Thomas Mueller
>            Priority: Minor
> If using a value larger than 33000 for minRecordLength, and then trying to store a value
with 33000 bytes, the following exception is thrown: UTFDataFormatException. The reason is
that values are serialized using DataOutputStream.writeUTF. There is size limitation of 65
K when using this method. Small entries are hex encoded, and there is a prefix, so the limitation
for minRecordLength should be 32000.
> This is a problem for both FileDataStore and DbDataStore.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message