Amit created Bug HHH-7980
Issue Type: Bug Bug
Affects Versions: 4.1.9
Assignee: Unassigned
Attachments: src.zip
Components: core
Created: 08/Feb/13 1:43 AM
Description:

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.

Project: Hibernate ORM
Priority: Blocker Blocker
Reporter: Amit
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira