首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >weblogic 12c部署失败

weblogic 12c部署失败
EN

Stack Overflow用户
提问于 2014-07-05 00:52:39
回答 4查看 18.4K关注 0票数 5

我正在从Weblogic 11g迁移到12c,在部署过程中失败,并显示以下错误:

Caused by: weblogic.application.naming.ReferenceResolutionException: [J2EE:160199]Error resolving ejb-ref "ejb/BizRuleFacade" from module "BizAgi-ejb.jar" of application "BizAgi-ear-Weblogic". The ejb-ref does not have an ejb-link and the JNDI name of the target bean has not been specified. Attempts to automatically link the ejb-ref to its target bean failed because multiple EJBs in the application were found to implement the "BizAgi.bpm.rules.entities.BizRuleFacade" interface, including BizAgi-war.war/BizRuleFacadeBean, BizAgi-ejb.jar/BizRuleFacadeBean. Specify a qualified ejb-link for this ejb-ref to indicate which EJB is the target of this ejb-ref.

我的web.xml文件如下所示:

<ejb-local-ref> <ejb-ref-name>ejb/BAScopeLogFacade</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <local>BizAgi.PAL.historylog.entities.BAScopeLogFacade</local> <ejb-link>BizAgi-ejb.jar#BAScopeLogFacadeBean</ejb-link> </ejb-local-ref>

BizAgi-ejb.jar是ear中的一个模块(BizAgi-ear-Weblogic.ear)。

如何正确部署我的应用程序?

EN

回答 4

Stack Overflow用户

发布于 2014-07-10 22:02:50

非常感谢大家,我终于找到了解决方案,那就是简单地从.war文件中删除META-INF/MANIFEST.MF文件。这样,EJB就不会被重复引用。

票数 2
EN

Stack Overflow用户

发布于 2019-07-05 16:53:11

1.在Ear Pom.xml中添加以下依赖项

代码语言:javascript
复制
  <dependency>
      <groupId>com.example</groupId>
      <artifactId>ejbModel</artifactId>
      <version>1.0-SNAPSHOT</version>
      <type>ejb</type>
  </dependency> 

2.在模块中添加pom.xml模块

代码语言:javascript
复制
  <modules>
      <ejbModule>
        <groupId>com.example</groupId>
        <artifactId>ejbModel</artifactId>
        <bundleFileName>ejbModel-1.0-SNAPSHOT.jar</bundleFileName>
      </ejbModule>
      .......
   </modules>

3.将ejbmodel依赖的范围更改为在应用程序pom.xml中提供

代码语言:javascript
复制
   <dependency>
     <groupId>com.example</groupId>
     <artifactId>ejbModel</artifactId>
     <version>1.0-SNAPSHOT</version>
     <type>jar</type>
     <scope>provided</scope>
   </dependency>

4.将ejbmodel应用程序的persistence.xml添加到资源文件夹

票数 1
EN

Stack Overflow用户

发布于 2019-03-05 19:06:31

确保相同的EJB不会在您的部署中多次加载。您可以通过使用weblogic console (AdminServer)并检查部署的EJB(通过单击部署概述中失败的部署旁边的小"+“符号)来检查这一点。

在我的例子中,我必须修复maven依赖项(通过将一个项目的一个依赖项设置为"provided"),这样它就不会两次加载相同的EJB。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24578438

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档