Eclipse - 如何修复错误“在项目中找不到persistence.xml文件” JPA问题 [英] Eclipse - How to fix error "No persistence.xml file found in project" JPA issue
问题描述
目标:创建一个新的项目GWT +应用程序引擎+ Maven
创建此项的步骤:
- Google eclipse插件:选择新建Web应用程序项目。
- 设置名称等。
- 右键单击项目>配置>
转换为Maven ... - 修复jdoconfig.xml文件:xsi有错误的
值。请参阅
使用不正确的网址验证jdoconfig
然后我收到上述错误。
该文件存在于scr / META-INF / persistence.xml
还有war / WEB-INF / classes / META-INF / persistence.xml
但是没有找到。
注意:我安装插件m2e,m2e-wtp和google eclipse插件
如果你正在使用eclipse。
尝试右键单击项目文件 - >构建路径 - >配置构建路径
步骤1:将文件夹META-INF添加到构建路径
步骤2:右键单击项目文件 - > Maven - >更新项目
Error "No persistence.xml file found in project" in Eclipse.
Aim: Create a new project GWT+App engine+Maven
Steps to create this:
- Google eclipse plugin: select "New Web Application Project".
- set the name etc.
- right-click on the project > Configure > Convert to Maven...
- Fix jdoconfig.xml file: xsi has the wrong value. see Validating jdoconfig with incorrect url
Then I get the above error.
The file exists at scr/META-INF/persistence.xml and also war/WEB-INF/classes/META-INF/persistence.xml But is not being found.
Notes: I installed plugins m2e, m2e-wtp and google eclipse plugin
If you are using eclipse. Try right clicking the Project File -> Build Path -> Configure Build Path
Step 1: Add the folder META-INF to the build path
Step 2: Right click the Project File -> Maven -> Update Project
这篇关于Eclipse - 如何修复错误“在项目中找不到persistence.xml文件” JPA问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!