Google+ Followers

Sep 18, 2014

org.hsqldb.HsqlException: data exception: string data, right truncation; table


I had this exception while testing (junit) my code.

It seems that when you use  Lob annotation and use HsqlDB, the default column size is probably less than the actual size you are trying to insert. In my case i annotated String with Lob (hibernate knows it should be clob) while my string length was huge -> got this exception.

To fix this, add hibernate column annotation with column length bigger like 15000 , this will solve it  (for example of course).

Hoped it helped,


No comments:

Post a Comment