Java 从10.3.6升级到Weblogic 12cR2后,由于NameReadyBoundException导致Weblogic部署问题

Java 从10.3.6升级到Weblogic 12cR2后,由于NameReadyBoundException导致Weblogic部署问题,java,deployment,ant,java-8,weblogic12c,Java,Deployment,Ant,Java 8,Weblogic12c,我有一个运行中的应用程序,它构建在Java1.6和WebLogic10.3.6上。 现在我正在迁移到Java1.8和WebLogic12CR2(12.2.1.3)。 我有一个EAR文件,它构建在ANT上,部署在Weblogic中 我已经在我的系统中安装了JDK 1.8和Weblogic 12cR2。我已经编译了我的代码库,并成功地在ANT上构建了它。生成的EAR文件没有任何错误。现在,我正试图在最新的Weblogic中部署它,我得到以下错误: weblogic.application.Modul

我有一个运行中的应用程序,它构建在Java1.6和WebLogic10.3.6上。 现在我正在迁移到Java1.8和WebLogic12CR2(12.2.1.3)。 我有一个EAR文件,它构建在ANT上,部署在Weblogic中

我已经在我的系统中安装了JDK 1.8和Weblogic 12cR2。我已经编译了我的代码库,并成功地在ANT上构建了它。生成的EAR文件没有任何错误。现在,我正试图在最新的Weblogic中部署它,我得到以下错误:

weblogic.application.ModuleException: 
Unable to bind Business Interface to the JNDI name: myapp_admin_ejb_jarAdminServiceBean_Home, 
throw exception javax.naming.NameAlreadyBoundException: [EJB:011224]Unable to bind the interface com.abc.xyz.admin.ejb.session.AdminServiceRemote to remote. 
Another EJB has already bound an interface to that name.; 
remaining name 'ejb/admin_service_jndi'. 
NestedException Message is :
Unable to bind the interface  to remote. 
Another EJB has already bound an interface to that name. at weblogic.application.internal.ExtensibleModuleWrapper.activate(ExtensibleModuleWrapper.java:123)



    <May 29, 2018 3:56:04,460 PM IST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID "10661298941920" for task "0" on [partition-name: DOMAIN]. Error is: "weblogic.application.ModuleException: Unable to bind Business Interface to the JNDI name: myapp_admin_ejb_jarAdminServiceBean_Home, throw exception javax.naming.NameAlreadyBoundException: [EJB:011224]Unable to bind the interface com.abc.xyzadmin.ejb.session.AdminServiceRemote to remote. Another EJB has already bound an interface to that name.; remaining name 'ejb/admin_service_jndi'. NestedException Message is :[EJB:011224]Unable to bind the interface com.abc.xyzadmin.ejb.session.AdminServiceRemote to remote. Another EJB has already bound an interface to that name."
weblogic.application.ModuleException: Unable to bind Business Interface to the JNDI name: myapp_admin_ejb_jarAdminServiceBean_Home, throw exception javax.naming.NameAlreadyBoundException: [EJB:011224]Unable to bind the interface com.abc.xyzadmin.ejb.session.AdminServiceRemote to remote. Another EJB has already bound an interface to that name.; remaining name 'ejb/admin_service_jndi'. NestedException Message is :[EJB:011224]Unable to bind the interface com.abc.xyzadmin.ejb.session.AdminServiceRemote to remote. Another EJB has already bound an interface to that name.
    at weblogic.application.internal.ExtensibleModuleWrapper.activate(ExtensibleModuleWrapper.java:123)
    at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:114)
    at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:212)
    at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:207)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
    Truncated. see log file for complete stacktrace
Caused By: Unable to bind Business Interface to the JNDI name: myapp_admin_ejb_jarAdminServiceBean_Home, throw exception javax.naming.NameAlreadyBoundException: [EJB:011224]Unable to bind the interface com.abc.xyzadmin.ejb.session.AdminServiceRemote to remote. Another EJB has already bound an interface to that name.; remaining name 'ejb/admin_service_jndi'. NestedException Message is :[EJB:011224]Unable to bind the interface com.abc.xyzadmin.ejb.session.AdminServiceRemote to remote. Another EJB has already bound an interface to that name.
    at weblogic.ejb.container.deployer.Ejb3SessionBinder.bindToJNDI(Ejb3SessionBinder.java:144)
    at weblogic.ejb.container.deployer.ClientDrivenBeanInfoImpl.activate(ClientDrivenBeanInfoImpl.java:900)
    at weblogic.ejb.container.deployer.EJBDeployer.activate(EJBDeployer.java:770)
    at weblogic.ejb.container.deployer.EJBModule.activate(EJBModule.java:447)
    at weblogic.application.internal.ExtensibleModuleWrapper$ActivateStateChange.next(ExtensibleModuleWrapper.java:317)
    Truncated. see log file for complete stacktrace
weblogic.application.ModuleException:
无法将业务接口绑定到JNDI名称:myapp\u admin\u ejb\u jarAdminServiceBean\u Home,
抛出异常javax.naming.NameAlreadyBoundException:[EJB:011224]无法将接口com.abc.xyz.admin.EJB.session.AdminServiceRemote绑定到远程。
另一个EJB已将接口绑定到该名称。;
剩余名称为“ejb/admin\u service\u jndi”。
NestedException消息为:
无法将接口绑定到远程。
另一个EJB已经将接口绑定到该名称。位于weblogic.application.internal.ExtensibleModuleWrapper.activate(ExtensibleModuleWrapper.java:123)

这个问题已经解决了

说明:我的应用程序有多个JAR,因此依赖关系也不同。正在从应用程序类路径读取JAR依赖项。因此,在所有JAR清单文件中都存在相同的名称

在目标创建过程中,我现在使用的是默认应用程序类路径以外的其他类路径:

<path id="mf.classpath">    
    <path refid="common.classpath" />
    <fileset dir="${dist.dir}" includes="/**/*.jar" excludes="/**/*ejb*"/>
</path>

这解决了我的问题