0

I'm using Java persistence and deploying on Tomcat, but I get an error saying "No Persistence provider for EntityManager named WorxVaultWeb" when running application. Source of this problem is that Tomcat is not deploying META-INF folder and persistence.xml. When I add it manually to deployement location, everything works fine.

Why is this happening, and how can I make Tomcat deploy those files.

Xitac
  • 154
  • 3
  • 9
  • 1
    Are you using maven? Where is your META-INF directory located? – Stefan Feb 28 '14 at 08:12
  • I more prefer to set properties in context-application instead of persistence-unit. I simply persistence-unit use for provider and classes. And I haven't any problems with it. But the best and flexible way to make it is using JNDI and set all properties in your server.xml (tomcat, I think this is best practice). If you want more help, provide more information. Cheers – user3252538 Feb 28 '14 at 08:28
  • Not using maven, it's in src folder – Xitac Feb 28 '14 at 08:36
  • And is the META-INF/persistence.xml part of the webapp you deploy? Tomcat deploys what you tell it to deploy. What does your deployed webapp look like? How do you deploy it? – JB Nizet Feb 28 '14 at 08:51

0 Answers0