Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
No Persistence provider for EntityManager
Hi!
This makes me mad :) Everything was working fine and I decided to change names of couple files and moved them to another package. After that I ran mvn clean package and tested that everything was working. NO it's not :)
javax.persistence.PersistenceException: No Persistence provider for EntityManager named testJPA
at javax.persistence.Persistence.createEntityManagerFactory(Unknown Source)
at javax.persistence.Persistence.createEntityManagerFactory(Unknown Source)
at com.vaadin.addon.jpacontainer.JPAContainerFactory.createEntityManagerForPersistenceUnit(JPAContainerFactory.java:103)
at com.vaadin.addon.jpacontainer.JPAContainerFactory.make(JPAContainerFactory.java:87)
In my pom.xml:
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>2.4.0-M12</version>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>javax.persistence</artifactId>
<version>2.1.0.v201201251030</version>
</dependency>
in my src/resources/persistence.xml:
<persistence-unit name="testJPA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
I have no idea what has happend. First by the way I copied one file to a new package and I got a error message that I have same persistence name in two files even if I deleted the file from the old folder.
EDIT: I recognized that under my target folder, there is no other jars at all, neither inside the deployed application .jar, no eclipselink.jar etc....
EDIT2: persistence.xml is not in correct place under the META-INF after the deploy. Have someone an idea what could be the reason for that, I haven't changed the pom.xml at all?
Thanks,
Sami