Joined: Fri Jun 30, 2006 12:11 am Posts: 7 Location: Pune
|
I upgraded my project with hibernate 4.1.9 and spring 3.2.1 and noticed that hibernate throws RuntimeExceptions instead of checked exception in the earlier version (3.6.0 final was the one we used earlier). The code use case is as below.
We use spring jdbc template for executing jdbc queries and the application is configured to use JPA (JPATransactionManager and JPADialect) for mapped entities. When executing a query which could throw a exception for e.g. a select query on a table that does not exist, hibernate now proxies the jdbc statements and throws a SQLGrammerException (extends RuntimeException) instead of a checked exception - SQLException.
Since spring catch's SQLException, the code no longer executes the catch block and fails with an exception.
Kindly let me know if there is any configuration change I need to make which might be leading to this?
|
|