In my JavaEE application I have got two JAR's (Entities, Interfaces), one EJB (Service) and one WAR (Vaadin) projects. The application server is WildFly (JBoss). After deploying project there is an following error. In GlassFish there is everything fine.
javax.servlet.ServletException: com.vaadin.server.ServiceException: javax.ejb.EJBException: org.hibernate.engine.jndi.JndiException: Unable to lookup JNDI name [javax.transaction.TransactionManager]
null: javax.naming.NameNotFoundException: project1-ear-1.0.0.0/project1-Services-ejb1.0.0.0/PersonServiceImpl!com.domain.project1.interfaces.PersonService -- service jboss.naming.context.java."project1-ear-1.0.0.0"."project1-Services-ejb1.0.0.0"."PersonServiceImpl!com.domain.project1.interfaces.PersonService
My lookup:
java:global/project1-ear-1.0.0.0/project1-Services-ejb-1.0.0.0/PersonServiceImpl!com.domain.project1.interfaces.PersonService
What's wrong? Thanks for help!
Since you are deploying this on wildfly you need to change the property in the > persistence.xml
provider FROM
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
TO
<provider>org.hibernate.ejb.HibernatePersistence</provider>
Remove both the hibernate.transaction.jta.platform properties
<name="hibernate.transaction.jta.platform" >
<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.SunOneJtaPlatform" />
<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.WeblogicJtaPlatform" />
and add the below instead
<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform"/>
that should resolve the transaction manager issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With