JavaEar 专注于收集分享传播有价值的技术资料

No META-INF/persistence.xml was found in classpath

I'm using netbeans 6.8 and the Persistence API.

In netbeans 6.8 the persistence.xml is placed in the src/conf/ folder. I've tried creating a /src/META-INF/ folder and copying the persistence.xml in that folder but I still get the error

No META-INF/persistence.xml was found in classpath.

When trying to run the application.

Any ideas?


  1. Make sure the root of the META-INF folder is on your classpath when you run the application. (the src directory will not be on the classpath, only the directory where NetBeans compiles the classes to).