mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-15 01:07:30 +08:00
Catch more general Hibernate 4.2 LinkageError
Update HibernateJpaAutoConfiguration to catch LinkageError rather than NoClassDefFoundError. Required due to the fact that JBoss EAP 6 wraps NoClassDefFoundErrors. Fixes gh-3605
This commit is contained in:
parent
b7e9f805c9
commit
a5430d8a0c
@ -147,8 +147,9 @@ public class HibernateJpaAutoConfiguration extends JpaBaseConfiguration {
|
||||
vendorProperties.put(JTA_PLATFORM, new SpringJtaPlatform(
|
||||
jtaTransactionManager));
|
||||
}
|
||||
catch (NoClassDefFoundError ex) {
|
||||
// Can happen if Hibernate 4.2 is used
|
||||
catch (LinkageError ex) {
|
||||
// NoClassDefFoundError can happen if Hibernate 4.2 is used and some
|
||||
// containers (e.g. JBoss EAP 6) wraps it in the superclass LinkageError
|
||||
if (!isUsingJndi()) {
|
||||
throw new IllegalStateException("Unable to set Hibernate JTA "
|
||||
+ "platform, are you using the correct "
|
||||
|
Loading…
Reference in New Issue
Block a user