spring-boot icon indicating copy to clipboard operation
spring-boot copied to clipboard

Unable to deploy JPA application to WAS 8 due to Hibernate 4.2

Open philwebb opened this issue 11 years ago • 7 comments

Raised in Gitter:

Think I figured out the issue with WAS and the datasource. I get an exception: NoClassDefFoundError: org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform This is because I am using Hibernate 4.2 and the packages for AbstractJtaPlatform changed between 4.2 & 4.3. Should be org.hibernate.service.jta.platform.internal.AbstractJtaPlatform. So potential bug in configureJtaPlatform() in HibernateJpaAutoConfiguration class?

philwebb avatar Dec 22 '14 17:12 philwebb

SpringJtaPlatform extends from AbstractJtaPlatform.

philwebb avatar Dec 22 '14 18:12 philwebb

@drumonii I think I have a fix for this but I don't have WAS installed. Could you try the 1.2.1.BUILD-SNAPSHOT and let me know if it works?

philwebb avatar Dec 23 '14 05:12 philwebb

Reopening whilst we wait for verification.

philwebb avatar Dec 23 '14 05:12 philwebb

@philwebb Be glad to! Anything in particular you are looking for? Or just that the Hibernate auto config works?

drumonii avatar Dec 23 '14 23:12 drumonii

Testing that your app starts fine would be a great feedback, thanks.

snicoll avatar Dec 24 '14 13:12 snicoll

@philwebb Looks good to me. App started up and was able to connect with a JNDI as well as a standard jdbc URL, username and password combo. Though I had to disable JTA through jta.enabled: false else I would get a NullPointerException at

org.hibernate.engine.transaction.internal.jta.JtaStatusHelper.getStatus(JtaStatusHelper.java:73)
org.hibernate.engine.transaction.internal.jta.JtaStatusHelper.isActive(JtaStatusHelper.java:115)

But there is no longer a NoClassDefFoundError thrown. If I come across anything else with WAS, I'll raise a issue or ask a question in gitter.

drumonii avatar Dec 30 '14 04:12 drumonii

The NPE is bad, can you create an issue with more details about it please? Thanks for testing!

snicoll avatar Dec 30 '14 08:12 snicoll