jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Nuescheler <david.nuesche...@gmail.com>
Subject Re: Limit of 65535 bytes per String value?
Date Thu, 17 Feb 2005 08:38:35 GMT
hi timur,

thanks for reporting that. maybe you could put that into
jira, since to me this really looks like a bug.

> I just have been hit by a strange limitation of Jackrabbit
> ObjectPersistenceManager.
> I've got a custom property with String type and multiple="true" (which is
> mapped to String[] Java type)
> The problem is that Jackrabbit writes these Strings internally using
> DataOutputStream.writeUTF method, which throws UTFDataFormatException when
> the number of bytes required to save that string is effectively more than
> 2^16, thus 65535
oops.

> That leaves me to worry, because I thought I could have used these String[]
> fields for multi-page articles and online books on my site. The only option
> I've left to is use of multiple Binary field which could store fields any
> length. However APIs for Binary fields works with InputStream!
> Because of this, my neat and nice
> setProperty("text", new String[] {xxx, yyy, ...});
> would suddenly explode into full-blown method or even class of its own!
should all be working exactly as you expected.
this sounds all very fishy to me, just for my reference which 
jdk version are you using?

> Were there any REAL reasons to limit Strings length by 65535?
> JCR spec, at a first quick sweep through, says nothing about it.
no, there is no limitation like that in jcr. i can't think of reason that 
would justify something like that ;)

> So I've made some quick changes to ObjectPersistenceManager, replacing
> read/writeUTF with byte-wise String persistence, and it works for me.
> Attached comes the copy.
unfortunately your attachment didn't make it (at least not to me),
but a lot of people had issues sending attachments to the list.

regards,
david

----------------------------------------------------------------------
standardize your content-repository !
                               http://www.jcp.org/en/jsr/detail?id=170
---------------------------------------< david.nuescheler@day.com >---

This message is a private communication. If you are not the intended
recipient, please do not read, copy, or use it, and do not disclose it
to others. Please notify the sender of the delivery error by replying
to this message, and then delete it from your system. Thank you.

The sender does not assume any liability for timely, trouble free,
complete, virus free, secure, error free or uninterrupted arrival of
this e-mail. For verification please request a hard copy version.


mailto:david.nuescheler@day.com
http://www.day.com

David Nuescheler
Chief Technology Officer
Day Software AG
Barfuesserplatz 6 / Postfach
4001 Basel
Switzerland

T  41 61 226 98 98
F  41 61 226 98 97

Mime
View raw message