Hello everybody!
I'm using hiebernate annotation and I would like display message error when error occur, example field "name" in Cat Object have Leng(min=2, max=10). When I insert an instance of Cat with name has length greater 10 at this time I would like display an error message use default in hibernate about length constraint. But I received this message:
SEVERE: 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) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:249)
Please help me!
Regard,
Nguyen Du.
|