Internal ORM exceptions are not thrown (when they should be!)

Description

In previous 4.x versions of Lucee, if there was a problem with ORM, such as the id was too long, an error would be thrown and we could save the subsequent transactions. In Lucee 5.2.5 the error isn't even thrown.

I have attached a test case using H2 as the database engine.

Environment

Commandbox
OSX

Activity

Show:
Seth Johnson
January 16, 2018, 8:06 PM

Also, using a SQL database connection inside an ORM transaction is not supported, but instead of getting an error it just fails silently as well.

Michael Offner
January 25, 2018, 1:13 PM

assuming you are using the default Hibernate version coming with that Lucee version:
3.5.5.68

Michael Offner
January 25, 2018, 2:06 PM

this causing the issue
https://luceeserver.atlassian.net/browse/LDEV-1427
problem is not in the extension, it is with transaction handling.

Michael Offner
January 25, 2018, 2:59 PM
Seth Johnson
February 7, 2018, 5:41 PM

Thanks for working on this! Exceptions do seem to be thrown now, but the error thrown is an object "BatchUpdateException". If we catch the exception we can use e.sqlException.tostring() to get the actual exception but previously I believe Lucee would throw the resulting error which in this case would be the result of e.sqlException.tostring() "java.sql.BatchUpdateException: Data truncation: Data too long for column 'card_processor_id' at row 1".

It would be helpful if the exception thrown is the string representation of the error.

Fixed

Assignee

Michael Offner

Reporter

Mark Drew

Priority

Critical

Labels

Fix versions

Sprint

None

Affects versions

Configure