I'm using hibernate 3 with mysql server 5.0 on a windows XP. I've set up a simple system where everything runs fine until I add too much (about 200 characters) text to one of the properties. I get the following error:
14:56:05,718 WARN JDBCExceptionReporter:71 - SQL Error: 0, SQLState: 01004
14:56:05,718 ERROR JDBCExceptionReporter:72 - Data truncation: Data too long for column 'text' at row 1
14:56:05,718 ERROR AbstractFlushingEventListener:300 - Could not synchronize database state with session
org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException
(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.j
ava:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelp
er.java:43)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:
202)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutio
ns(AbstractFlushingEventListener.java:297)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlus
hEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:985)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:333)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java
:106)
What happened. How to avoid?
|