When persisting an EJB3 entity bean "PageResult" containing a variable of type String called "pageText", the most recent version of Hibernate first creates the table "PageResult" with the column "pageText" of sql data type VARCHAR(255).
Hibernate then tries to persist a "PageResult" EJB containing a "pageText" of _more_ than 255 characters, throwing the error:
Code:
ERROR [org.hibernate.util.JDBCExceptionReporter] Data truncation: Data too long for column 'pageText' at row 1
The database used is MySql 5.0 .
The JDBC driver used is mysql-connector-java-5.0.5-bin.jar .
Any ideas on how to store a String greater than 255 chars?
Thanks in advance.