I am a newbie in WAS Liberty and trying to deploy a spring boot application. The sever is throwing an exception at startup.
[AVERTISSEMENT] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is java.lang.UnsupportedOperationException
The problem is that Hibernate is trying to call a suspend with a wrong transaction manager class : Caused by: java.lang.UnsupportedOperationException at org.hibernate.engine.transaction.jta.platform.internal.WebSphereExtendedJtaPlatform$TransactionManagerAdapter.suspend(WebSphereExtendedJtaPlatform.java:131)
This class was configured by Spring Boot in the class HibernateJpaConfiguration which does not include the proper transaction manager :
private static final String[] WEBSPHERE_JTA_PLATFORM_CLASSES = { "org.hibernate.engine.transaction.jta.platform.internal.WebSphereExtendedJtaPlatform", "org.hibernate.service.jta.platform.internal.WebSphereExtendedJtaPlatform" };
when i change the class to org.hibernate.engine.transaction.jta.platform.internal.WebSphereLibertyJtaPlatform the application starts. Is this a configuration issue or is spring boot not supporting WAS Liberty.
Thanks for your help.