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/view/Exhibit/Presidents3 ( src
<http://nielsmayer.com/xwiki/bin/download/Exhibit/Presidents3/Exhibit.Presidents3.xar>)
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:
A problem occured while trying to process your request. Please contact the
webmaster if this happens again.
Detailed information:
Error number 3201 in 3: Exception while saving document Exhibit.pods
Wrapped Exception: could not update:
[com.xpn.xwiki.objects.LargeStringProperty#component[id,name]{id=-2025184002, name=code}]
com.xpn.xwiki.XWikiException: Error number 3201 in 3: Exception while saving document
Exhibit.pods
Wrapped Exception: could not update:
[com.xpn.xwiki.objects.LargeStringProperty#component[id,name]{id=-2025184002, name=code}]
at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:595)
at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:135)
at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:128)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1282)
at com.xpn.xwiki.web.SaveAction.save(SaveAction.java:176)
at com.xpn.xwiki.web.SaveAndContinueAction.action(SaveAndContinueAction.java:64)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:215)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
...
Wrapped Exception:
com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column
'XWL_VALUE' at row 1
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2983)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3256)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1313)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1585)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1500)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1485)
at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
at
org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2412)
at
org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2312)
at
org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2612)
at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:96)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
at
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:866)
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:837)
at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:585)
at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:135)
at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:128)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1282)
at com.xpn.xwiki.web.SaveAction.save(SaveAction.java:176)
at com.xpn.xwiki.web.SaveAndContinueAction.action(SaveAndContinueAction.java:64)
Thanks.
Niels
http://nielsmayer.com