Hello, This looks like a bug, could you report it to JIRA please ?
Regards, Sorin B. On Thu, Jan 19, 2012 at 11:19 PM, Robert Pollina <[email protected]>wrote: > XWIKI ENTERPRISE 3.3 > MySql 5.1 > > Issue: If you select a large section of text on a page an create an > annotation, when you press the ADD ANNOTATION button, a red FAILED message > is displayed. If you look in the logs, you will se the exception: > > … > 2012-01-19 14:53:26,146 [ > http://take5.azorescorp.com:8080/rest/wikis/xwiki/spaces/Azores+Software+Group/pages/AmandaBackups/annotations?media=json] > WARN o.h.u.JDBCExceptionReporter - SQL Error: 1406, SQLState: 22001 > 2012-01-19 14:53:26,146 [ > http://take5.azorescorp.com:8080/rest/wikis/xwiki/spaces/Azores+Software+Group/pages/AmandaBackups/annotations?media=json] > ERROR o.h.u.JDBCExceptionReporter - Data truncation: Data too long for > column 'XWR_COMMENT' at row 1 > Jan 19, 2012 2:53:26 PM > org.xwiki.annotation.rest.internal.AnnotationsRESTResource doPostAnnotation > SEVERE: An exception occurred when accessing the storage services > … > > This is a result of the table definition: > > CREATE TABLE `xwikircs` ( > `XWR_DOCID` bigint(20) NOT NULL, > `XWR_VERSION1` int(11) NOT NULL, > `XWR_VERSION2` int(11) NOT NULL, > `XWR_DATE` datetime NOT NULL, > `XWR_COMMENT` varchar(255) NOT NULL, > `XWR_AUTHOR` varchar(255) NOT NULL, > `XWR_ISDIFF` bit(1) DEFAULT NULL, > `XWR_PATCH` longtext, > PRIMARY KEY (`XWR_DOCID`,`XWR_VERSION1`,`XWR_VERSION2`), > KEY `REV_DATE` (`XWR_DATE`), > KEY `REV_AUTHOR` (`XWR_AUTHOR`), > KEY `REV_ISDIFF` (`XWR_ISDIFF`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8$$ > > The XWR_COMMENT column is only 255 characters; however, xwiki is trying to > assign to this column the text: > > Added annotation on " <selected text>" > > Which can easily exceed 255 characters. > > Either the comments needs to be truncated, or the column should be defined > as a CLOB. > > It turns out that the annotation is saved -- when the page is reloaded, > the text is highlighted and the annotation text is available. > -- > Robert Pollina > Sr. Software Engineer > > Azores Corp > 16 Jonspin Rd., Wilmington MA 01887 > 978-253-6239 > > _______________________________________________ > users mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/users > _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
