Weblogic 12上的javax.naming.NameNotFoundException

时间:2019-07-24 06:39:28

标签: weblogic12c ejb-2.x

当前,我的应用程序在Weblogic 12.1.1和EJB 2.1上运行良好。但是现在我需要升级到Weblogic 12.1.3,然后看到下面的错误

javax.naming.NameNotFoundException:尝试查找'eservices.ejb.session.SysFacadeLocalHome'时未找到子上下文'ejb'。已解决的“电子服务”;剩余名称'ejb / session / SysFacadeLocalHome' weblogic.application.ModuleException:javax.naming.NameNotFoundException:尝试查找'eservices.ejb.session.SysFacadeLocalHome'时未找到子文本'ejb'。解决的“电子服务”;剩余名称'ejb / session / SysFacadeLocalHome'         在weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:114)         在weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)         在weblogic.application.internal.flow.ModuleStateDriver $ 1.next(ModuleStateDriver.java:175)         在weblogic.application.internal.flow.ModuleStateDriver $ 1.next(ModuleStateDriver.java:170)         在weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)         被截断了。请参阅日志文件以获取完整的stacktrace 原因:javax.naming.NameNotFoundException:尝试查找'eservices.ejb.session.SysFacadeLocalHome'时未找到子上下文'ejb'。解决的“美食”;剩余名称'ejb / session / SysFacadeLocalHome'         在weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1180)         在weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:265)         在weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:187)         在weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:210)         在weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:224)

我如下创建了我的bean

@FileGeneration(remoteClass = Constants.Bool.TRUE, 
            remoteClassName = "SysFacadeRemote", 
            remoteHome = Constants.Bool.TRUE, 
            remoteHomeName = "SysFacadeRemoteHome", 
            localClass = Constants.Bool.TRUE, 
            localClassName = "SysFacadeLocal", 
            localHome = Constants.Bool.TRUE, 
            localHomeName = "SysFacadeLocalHome")
@JndiName(remote = "eservices.ejb.session.SysFacadeRemoteHome",
      local = "eservices.ejb.session.SysFacadeLocalHome")
@Session(transactionType = Session.SessionTransactionType.CONTAINER, 
     allowConcurrentCalls = Constants.Bool.TRUE, 
     enableCallByReference = Constants.Bool.TRUE, 
     defaultTransaction = Constants.TransactionAttribute.REQUIRED, 
     type = Session.SessionType.STATELESS, 
     ejbName = "SysFacadeBean")
public class SysFacadeBean extends GenericSessionBean implements SessionBean

系统将自动生成weblogic-ejb-jar.xml

<weblogic-enterprise-bean>
<ejb-name>SysFacadeBean</ejb-name>
<enable-call-by-reference>true</enable-call-by-reference>
<jndi-name>com.starhub.eservices.ejb.session.SysFacadeRemoteHome</jndi-name>
<local-jndi-name>com.starhub.eservices.ejb.session.SysFacadeLocalHome</local-jndi-name>
  </weblogic-enterprise-bean>

0 个答案:

没有答案