I have a JBoss EAP 6.1.0.GA (AS 7.2.0.Final-redhat-8) and I want to deploy a java web-project that uses JPA. I use with Eclipse / Maven and upon deploying the application I recieve the error:
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011047:
Can't find a persistence unit named cinemaReservationPersistenceUnit in deployment "javakurs3.final.project.cinema.war"
This is my project structure in Eclipse:
After having read some of the related questions here, for example:
JBoss7.1.0: Can't find a persistence unit named null in subdeployment
I was not able to find a solution to my Problem This is my persistence.xml file:
<?xml version="1.0" encoding="UTF-8" ?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
<persistence-unit name="cinemaReservationPersistenceUnit" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect" />
<property name="hibernate.max_fetch_depth" value="3" />
<property name="hibernate.hbm2ddl.auto" value="create.update" />
<property name="hibernate.show_sql" value="true" />
</properties>
</persistence-unit>
</persistence>
Could you please help?