If Hibernate throws an Exception, then J2EETransaction marks the transaction as
rollback-only and drops the exception. Upon commit, the only thing you see is a
"transaction marked as rollback"-Exception but not the original exception. This
means hours of debugging as you cannot see the reason for the rollback.
In my case, I had a 'nullable = "false"' on an EntityBean-field, but the
corresponding column was marked as nullable. When trying to change a row where
this field was db-null, I got an exception from Hibernate:
org.hibernate.PropertyValueException: not-null property references a null or
See? Everything you need to fix this bug. But this exception is never logged by
This is the change where someone addressed the problem of exceptions:
IMHO, there should be a log of the exception and not swallowing, i.e.
_logger.log(Level.WARNING, "Exception while committing transaction.", ex);