I have a web app, using EclipseLink and MySQL for storing data.
Some of these data are strings, ie varchars in the DB.
In the code of entities, the strings have attributes
Since the Exception seems to be raised at the database level during the commit() process, a before-insert Trigger on the target table/s could truncate the new values before they are committed, bypassing the error.