'Hibernate bhm2ddl import.sql: can it be configured to terminate/log errors when errors exist in import.sql?

I have JPA/Hibernate unit tests that use an H2 in memory database & hibernate hbm2ddl to populate test data. They are run in Spring/JUnit.

Currently if there are errors in import.sql, the system logs them silently and continues.

The desired behavior is if there is a SQL error of any kind the import process should terminate with the SqlException. Alternatively, at least logging the SQL error to system out would be acceptable.

Is there a way to accomplish this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source