Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/jpa/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 找不到持久性单元,但文件在那里_Java_Jpa_Netbeans - Fatal编程技术网

Java 找不到持久性单元,但文件在那里

Java 找不到持久性单元,但文件在那里,java,jpa,netbeans,Java,Jpa,Netbeans,我使用netbeans,编译时遇到问题 我找不到名为“概念服务”的持久化单元 在此文件夹中 /home/bob/dev/storm/src/main/webapp/META-INF/ 我有context.xml和persistence.xml 有什么想法吗?您的persistence.xml最终应该在 webapp/WEB-INF/classes/META-INF 不是 webapp/META-INF 您的webapp/META-INF位置应该仍然具有context.xml文件。您是否确实在pe

我使用netbeans,编译时遇到问题

我找不到名为“概念服务”的持久化单元

在此文件夹中 /home/bob/dev/storm/src/main/webapp/META-INF/

我有context.xml和persistence.xml


有什么想法吗?

您的persistence.xml最终应该在

webapp/WEB-INF/classes/META-INF

不是

webapp/META-INF


您的webapp/META-INF位置应该仍然具有context.xml文件。

您是否确实在persistence.xml文件中将持久化单元命名为“conceptService”。你真的应该检查一下。否则,为了得到更多的答案,你应该在你的问题中添加更多的信息?因为你的源文件在哪里并不意味着什么。。。这取决于您的构建。这是错误的,我有一个直接在META-INF中包含文件的项目,它可以完美地工作。