Merge pull request #3605 from tan9/patch-3
* pr/3605: Catch more general Hibernate 4.2 LinkageError
This commit is contained in:
commit
624350f41e
|
|
@ -147,8 +147,9 @@ public class HibernateJpaAutoConfiguration extends JpaBaseConfiguration {
|
||||||
vendorProperties.put(JTA_PLATFORM, new SpringJtaPlatform(
|
vendorProperties.put(JTA_PLATFORM, new SpringJtaPlatform(
|
||||||
jtaTransactionManager));
|
jtaTransactionManager));
|
||||||
}
|
}
|
||||||
catch (NoClassDefFoundError ex) {
|
catch (LinkageError ex) {
|
||||||
// Can happen if Hibernate 4.2 is used
|
// 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()) {
|
if (!isUsingJndi()) {
|
||||||
throw new IllegalStateException("Unable to set Hibernate JTA "
|
throw new IllegalStateException("Unable to set Hibernate JTA "
|
||||||
+ "platform, are you using the correct "
|
+ "platform, are you using the correct "
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue