日期:2014-05-18  浏览次数:20773 次

开始学无状态Session出现的错误 javax.naming.NameNotFoundException:
无状态Session

看教科书例子学ejb的第一个例子的出现的问题.使用weblogic   的.

javax.naming.NameNotFoundException:   Unable   to   resolve   'CurrencyConverter '   Resolved     [Root   exception   is   javax.naming.NameNotFoundException:   Unable   to   resolve   'CurrencyConverter '   Resolved   ];   remaining   name   'CurrencyConverter '
at   weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
at   weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:290)
at   weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:247)
at   weblogic.jndi.internal.ServerNamingNode_814_WLStub.lookup(Unknown   Source)
at   weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:371)
at   weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:359)
at   javax.naming.InitialContext.lookup(InitialContext.java:347)
at   currency.CurrencyConverterTestClient1.initialize(CurrencyConverterTestClient1.java:24)
at   currency.CurrencyConverterTestClient1. <init> (CurrencyConverterTestClient1.java:14)
at   currency.CurrencyConverterTestClient1.main(CurrencyConverterTestClient1.java:104)
Caused   by:   javax.naming.NameNotFoundException:   Unable   to   resolve   'CurrencyConverter '   Resolved  
at   weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:897)
at   weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:230)
at   weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:154)
at   weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:188)
at   weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown   Source)
at   weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
at   weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
at   weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
at   weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at   weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at   weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
at   weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
at   weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at   weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
at   java.lang.Thread.startThreadFromVM(Unknown   Source)
java.lang.NullPointerException
at   currency.CurrencyConverterTestClient1.main(CurrencyConverterTestClient1.java:111)
错误....


-----------------
qq:       msn:

------解决方案--------------------
'CurrencyConverter '

这个jndi 名字找不到

你的ejb-jar.xml 中配置的 home接口的JNDI名字是什么


------解决方案--------------------
自己用 9.0 weblogic 重做一次 搞定了,不知道问题的所在.