在类路径中找不到META-INF / persistence.xml

时间:2012-08-27 09:58:44

标签: java jpa netbeans persistence persistence.xml

我正在使用netbeans 6.8和Persistence API。

在netbeans 6.8中,persistence.xml放在src / conf /文件夹中。 我已经尝试创建/ src / META-INF /文件夹并复制该文件夹中的persistence.xml但我仍然收到错误

在类路径中找不到META-INF / persistence.xml。

尝试运行该应用程序时。

有什么想法吗?

1 个答案:

答案 0 :(得分:2)

运行应用程序时,请确保META-INF文件夹的根位于类路径中。 (src目录不在类路径上,只有NetBeans编译类的目录)。

相关问题