我使用在JBoss 7.1上运行的Spring 4 MVC,Spring Data和Spring Security进行生产应用程序,每个方面都可以正常工作。
现在我想将此应用程序迁移到使用Java 8在Wildfly上运行。当我的应用程序部署时出现此错误:
JBAS016069: Error injecting persistence unit into CDI managed bean. Can't find a persistence unit named sgn-core in deployment sgn-web.war
我把JPA日志放在TRACE上,而Wildfly正在解释这个问题:
6:38:41,835 TRACE [org.jboss.as.jpa.messages] (weld-worker-2) pu search for name 'sgn-core' inside of sgn-web.war 16:38:41,841 TRACE [org.jboss.as.jpa.messages] (weld-worker-2) pu findWithinDeployment searching for sgn-core 16:38:41,842 TRACE [org.jboss.as.jpa.messages] (weld-worker-2) pu findWithinDeployment skipping empty pu holder for sgn-core ... 16:38:41,912 TRACE [org.jboss.as.jpa.messages] (weld-worker-2) findWithinLibraryJar checking for 'sgn-core' found no persistence units ...
但我的申请是一样的,并没有改变任何想法。
以下是完整的server.log
sgn-core是我的持久性单元的名称。
Everythink在生产JBoss 7.1上运行良好,但现在在Wildfly上运行
请有人帮帮我吗?
答案 0 :(得分:0)
我有类似的问题。事实证明,我错过了拼写persistence.xml文件。