打包/部署到tomcat时,GWT/Maven项目中找不到META-INF/persistence.xml
我目前正在开发一个 GWT 项目。由于我使用 maven 来构建它,因此我使用 GWT webapplicationcreator shell 脚本通过 -maven 选项来创建它。
所以问题是,当我使用“mvn package”打包项目并将其部署到tomcat时,它告诉我它无法找到META-INF/persistence.xml,即使在我的项目中我有它在正确的位置位置 src/main/webapp/META-INF/persistence.xml。我什至提取了 war 文件来检查它是否存在。
246 [Thread-38] INFO org.hibernate.ejb.Ejb3Configuration - 在类路径中找不到任何 META-INF/persistence.xml 文件
您是否经历过这种奇怪的行为?你能帮我弄清楚吗?
非常感谢大家
I am currently working on a GWT project. I have used the GWT webapplicationcreator shell script to create it with the -maven option since I use maven for building it.
So the problem is that when I package the project, using "mvn package", and deploy it to tomcat, it tells me that it can not find out META-INF/persistence.xml even though in my project I have it at the correct location src/main/webapp/META-INF/persistence.xml. I have even extracted the war file to check that it's out there.
246 [Thread-38] INFO org.hibernate.ejb.Ejb3Configuration - Could not find any META-INF/persistence.xml file in the classpath
Have you ever experienced this weird behaviour ? Can you help me figure it out ?
thanks a lot guys
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查 persistence.xml 是否正确部署。
请参阅这个非常有用的链接:
http://javahowto.blogspot.com /2007/06/where-to-put-persistencexml-in-web-app.html
Check persistence.xml is correctly deployed.
See this very useful link:
http://javahowto.blogspot.com/2007/06/where-to-put-persistencexml-in-web-app.html