Can you check the length yourself in e.g. PreUpdate/PrePersist callbacks? Otherwise, you can look at the nested exception(s) to get the SQLException and extract the error code from it.
thanks,
-marina
[Message sent by forum member 'mvatkina' (mvatkina)]
http://forums.java.net/jive/thread.jspa?messageID=247275