Skip to content

Commit 624350f

Browse files
committed
Merge pull request #3605 from tan9/patch-3
* pr/3605: Catch more general Hibernate 4.2 LinkageError
2 parents b7e9f80 + a5430d8 commit 624350f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,9 @@ private void configureSpringJtaPlatform(Map<String, Object> vendorProperties,
147147
vendorProperties.put(JTA_PLATFORM, new SpringJtaPlatform(
148148
jtaTransactionManager));
149149
}
150-
catch (NoClassDefFoundError ex) {
151-
// Can happen if Hibernate 4.2 is used
150+
catch (LinkageError ex) {
151+
// NoClassDefFoundError can happen if Hibernate 4.2 is used and some
152+
// containers (e.g. JBoss EAP 6) wraps it in the superclass LinkageError
152153
if (!isUsingJndi()) {
153154
throw new IllegalStateException("Unable to set Hibernate JTA "
154155
+ "platform, are you using the correct "

0 commit comments

Comments
 (0)