[xwiki-users] "Data too long for column 'XWV_IP'"
Hi all, After migrating my XE from 2.x to 3.1, I get a bunch of these errors in my logs : "[Statistics storing daemon] ERROR o.h.u.JDBCExceptionReporter - Data truncation: Data too long for column 'XWV_IP' at row 1" I suppose it's a change in the statistics related tables ... What should I do to remove these errors ? Full stack trace : 2011-09-14 16:11:50,551 [Statistics storing daemon] ERROR o.h.u.JDBCExceptionReporter - Data truncation: Data too long for column 'XWV_IP' at row 1 2011-09-14 16:11:50,551 [Statistics storing daemon] ERROR .AbstractFlushingEventListener - Could not synchronize database state with session org.hibernate.exception.DataException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:77) ~[hibernate-3.2.6.ga.jar:3.2.6.ga] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) ~[hibernate-3.2.6.ga.jar:3.2.6.ga] at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:253) ~[hibernate-3.2.6.ga.jar:3.2.6.ga] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266) ~[hibernate-3.2.6.ga.jar:3.2.6.ga] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167) ~[hibernate-3.2.6.ga.jar:3.2.6.ga] at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298) ~[hibernate-3.2.6.ga.jar:3.2.6.ga] at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) [hibernate-3.2.6.ga.jar:3.2.6.ga] at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000) [hibernate-3.2.6.ga.jar:3.2.6.ga] at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338) [hibernate-3.2.6.ga.jar:3.2.6.ga] at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106) [hibernate-3.2.6.ga.jar:3.2.6.ga] at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:871) [xwiki-platform-oldcore-3.1.jar:na] at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:842) [xwiki-platform-oldcore-3.1.jar:na] at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiCollection(XWikiHibernateStore.java:1054) [xwiki-platform-oldcore-3.1.jar:na] at com.xpn.xwiki.stats.impl.xwiki.VisitStatsStoreItem.storeInternal(VisitStatsStoreItem.java:112) [xwiki-platform-oldcore-3.1.jar:na] at com.xpn.xwiki.stats.impl.xwiki.AbstractStatsStoreItem.store(AbstractStatsStoreItem.java:99) [xwiki-platform-oldcore-3.1.jar:na] at com.xpn.xwiki.stats.impl.xwiki.XWikiStatsStoreService.register(XWikiStatsStoreService.java:167) [xwiki-platform-oldcore-3.1.jar:na] at com.xpn.xwiki.stats.impl.xwiki.XWikiStatsStoreService.runInternal(XWikiStatsStoreService.java:119) [xwiki-platform-oldcore-3.1.jar:na] at com.xpn.xwiki.util.AbstractXWikiRunnable.run(AbstractXWikiRunnable.java:99) [xwiki-platform-oldcore-3.1.jar:na] at java.lang.Thread.run(Thread.java:619) [na:1.6.0_11] Caused by: java.sql.BatchUpdateException: Data truncation: Data too long for column 'XWV_IP' at row 1 at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2007) ~[mysql-connector-java-5.1.10-bin.jar:na] at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1443) ~[mysql-connector-java-5.1.10-bin.jar:na] at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) ~[commons-dbcp-1.3.jar:1.3] at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) ~[commons-dbcp-1.3.jar:1.3] at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) ~[commons-dbcp-1.3.jar:1.3] at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48) ~[hibernate-3.2.6.ga.jar:3.2.6.ga] at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246) ~[hibernate-3.2.6.ga.jar:3.2.6.ga] ... 16 common frames omitted Thanks ! Jeremie. -- View this message in context: http://xwiki.475771.n2.nabble.com/Data-too-long-for-column-XWV-IP-tp6792700p... Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi again, Any clue on this previous post ? I didn't find anything about it ... Don't know if it's linked, but some users (including me) never receive any watchlist notifications ... Though others do ... Best regards, Jeremie -- View this message in context: http://xwiki.475771.n2.nabble.com/Data-too-long-for-column-XWV-IP-tp6792700p... Sent from the XWiki- Users mailing list archive at Nabble.com.
I found ... I checked in hibernate mapping, it seems at some time length of column XWV_IP (in xwikistatsvisit) was increased from 32 to 255 ... Strangely in my instance it was not automatically migrated. I altered the column and don't get this error anymore. -- View this message in context: http://xwiki.475771.n2.nabble.com/Data-too-long-for-column-XWV-IP-tp6792700p... Sent from the XWiki- Users mailing list archive at Nabble.com.
On 10/03/2011 09:35 AM, jerem wrote:
I found ... I checked in hibernate mapping, it seems at some time length of column XWV_IP (in xwikistatsvisit) was increased from 32 to 255 ... Strangely in my instance it was not automatically migrated. I altered the column and don't get this error anymore.
Hibernate can automatically create tables and their columns, but it won't automatically change existing columns. -- Sergiu Dumitriu http://purl.org/net/sergiu/
On Oct 4, 2011, at 7:15 AM, Sergiu Dumitriu wrote:
On 10/03/2011 09:35 AM, jerem wrote:
I found ... I checked in hibernate mapping, it seems at some time length of column XWV_IP (in xwikistatsvisit) was increased from 32 to 255 ... Strangely in my instance it was not automatically migrated. I altered the column and don't get this error anymore.
Hibernate can automatically create tables and their columns, but it won't automatically change existing columns.
See also http://www.alittlemadness.com/2006/08/28/incremental-schema-upgrades-using-h... and http://stackoverflow.com/questions/4574785/update-database-schema-with-hiber... Sergiu, this seems to indicate that at some point we should have had a migrator to perform this change IMO as otherwise we're not doing a good job for upgrading XWiki. I remember we've just changed some sizes in our Hibernate file, does it mean we might have some problems in the future ? (prolly not since we reduced the size instead of increasing it). Thanks -Vincent
participants (3)
-
jerem -
Sergiu Dumitriu -
Vincent Massol