| When calling create named query outside a transaction an IllegalStateException is thrown out of the entity manager rather than the expected IllegalArgumentException Code below demonstrates the issue https://github.com/paul41979/hibernateexceptiontest This issue is related to an issue identified in spring data jpa where the exception causes the application context to fail to initialise. Spring Data Team suggested that the entity manager should only throw illegalargumentexception https://jira.spring.io/browse/DATAJPA-1178?jql=project%20%3D%20DATAJPA |