Sergiu -- Thanks for the hints. For now, I'm going to stay lazy&compatible
and just split the data into multiple ~60K chunks, then cobble it all
together in JS before sending it off to Exhibit... it'll still be faster
that way than sticking the data in a separate document or attachment,
requiring a separate connection/lookup/request/response/parsing/etc...
For example, here (
http://nielsmayer.com/xwiki/bin/view/Exhibit/pods ) I
can only fit half the data and two points of the map/geolocation data, but
at least it's beginning to work. I'll worry about adding the other half of
the data later :-)
In the long run, I plan to turn parsing "on" in XWiki.JavaScriptExtension[0]
and use velocity loops and xwiki database lookups to create the JSON data
directly in Xwiki. Then I will no longer be needing such long static JSON
data.
Niels
http://nielsmayer.com
Ps: It would be trivial to build nifty ajaxy search/navigation/hierarchy
browsers into Xwiki w/ Exhibit, and it saves a lot of time on tedious ajax
programming once you get used to it. It is quite awesome at what it does,
and lets things stay at a nice high/abstract level.
On Tue, May 12, 2009 at 2:32 PM, Sergiu Dumitriu <sergiu(a)xwiki.com> wrote:
Niels Mayer wrote:
In 1.8, if too much data is entered in a
doc's ?editor=object
fieldXWiki.JavaScriptExtension[] (say
a big chunk of JSON on the order of 97783 bytes) you can no longer save
without getting an underlying error. This appears related to the
following:
com.xpn.xwiki.objects.LargeStringProperty -->
com.mysql.jdbc.MysqlDataTruncation:
Data truncation: Data too long for column 'XWL_VALUE' at row 1
How can this be changed to allow for a larger limit on entries?
Fortunately,
http://nielsmayer.com/xwiki/bin/download/Exhibit/Presidents3/Exhibit.Presid…
)
has entries small enough, but as you grow the amount of Javascript data
you
hold in a XWiki.JavaScriptExtension you
eventually get a failure like
this:
This is a LargeStringProperty, which by defaults is configured to hold
at least 60000 chars. In mysql, this translates to a TEXT column, which
can hold 65,535 characters.
Locally, you can alter the xwikilargestrings table to convert the
XWL_VALUE column to MEDIUMTEXT to get past this issue.
Globally, we can consider increasing the size for this field, but I
don't know if it's a good idea. You should keep your files small. On the
other hand, this also affects other objects, so for example long blog
articles won't fit.
Another idea is to put the file as an attachment on the skin document,
or in the filesystem, and call it with the jsfx plugin instead of the
jsx one. The drawback is that it will be a bit harder to edit, as you
will need to change it locally and then re-attach it.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs