gpt4 book ai didi

java - ear 部署失败 - 无法解析引用 Remote ejb-ref

转载 作者:搜寻专家 更新时间:2023-11-01 03:54:36 24 4
gpt4 key购买 nike

我有以下EAR:

dao.jar                  EJB-JAR    (has a dependency on entities.jar)
web.war JSF-WAR (hello world jsf demo - no un-jsf dependencies)
/lib/entities.jar POJO-JAR (contains persistence.xml & entity classes)




我正在将它部署到 Glassfish 3.1.2

当我尝试在 EAR 中同时打包两者时,我收到以下部署错误:

     SEVERE: Exception while deploying the app [web-league-table-ear] : 
Cannot resolve reference Remote ejb-ref
name=org.eclipse.persistence.jpa.rs.Service/persistenceFactory,
Remote 3.x interface =org.eclipse.persistence.jpa.rs.PersistenceFactory,
ejb-link=null,lookup=,mappedName=,jndi-name=,refType=Session
because there are 2 ejbs in the application with interface org.eclipse.persistence.jpa.rs.PersistenceFactory.

Some of the possible causes:

1. The EJB bean class was packaged in an ear lib library (or through any other
library mechanism which makes the library visible to all component modules),
this makes all the component modules include this bean class indirectly.

2. The EJB bean class was packaged in a component module which references the
EJB, either directly or indirectly through Manifest, WEB-INF/lib.

The EJB bean class should only be packaged in the declaring ejb module and
not the referencing modules. The referencing modules should only
include EJB interfaces.

EAR 在以下情况下正确部署:

Either the dao jar or the war are ommitted.

If I remove the war the EAR deploys and the Tester WebServices in the DAO work fine.

If I remove the dao jar the EAR deploys and the JSF Hello World launches/works fine.

有人有什么想法吗?感谢阅读。

最佳答案

也许您的 dao.jar 也打包在您的 web.war 中(不应包含它)。

关于java - ear 部署失败 - 无法解析引用 Remote ejb-ref,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12394649/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com