如何在NetBeans 8.2和GlassFish 4.1.1中同时部署EJB和War模块

时间:2018-07-28 08:39:51

标签: ejb netbeans-8 glassfish-4

我在GlassFish 4.1.1的NetBeans 8.2中同时部署EJB和WAR模块时遇到问题。显示以下消息:

[[ Exception Occurred :Error occurred during deployment: Exception while preparing the app : Could not resolve a persistence unit corresponding to the persistence-context-ref-name [ejb.NewMessage/em] in the scope of the module called [TestEJB-ejb]. Please verify your application.. Please see server.log for more details.]]

当我检查GlassFish服务器的server.log文件时,遇到以下错误消息:

[2018-07-28T12:59:45.406+0430] [glassfish 4.1] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=427 _ThreadName=admin-listener(7)] [timeMillis: 1532766585406] [levelValue: 1000] [[
  Exception while preparing the app : Could not resolve a persistence unit corresponding to the persistence-context-ref-name [ejb.NewEntityFacade/em] in the scope of the module called [TestEJB-ejb]. Please verify your application.]]

有什么解决办法吗?

感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

如果您没有开始创建应用程序,或者您没有选择编程框架,那么可以轻松地切换到Java Spring!

阅读以下链接的第一段: https://en.wikipedia.org/wiki/Spring_Framework