当前位置: 技术问答>java相关
这是什么原因??
来源: 互联网 发布时间:2015-03-29
本文导语: 一个CMP的ejb,Jbuilder5.0+BAS4.5 现在容器已经ready了, 运行客户端 出现一下问题: javax.naming.NameNotFoundException. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(NotFoun...
一个CMP的ejb,Jbuilder5.0+BAS4.5
现在容器已经ready了,
运行客户端
出现一下问题:
javax.naming.NameNotFoundException. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound
at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(NotFoundHelper.java:34)
at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.extract(NotFoundHelper.java:50)
at org.omg.CosNaming._NamingContextStub.resolve(_NamingContextStub.java:161)
at com.sun.jndi.cosnaming.CNCtx.callResolve(CNCtx.java:324)
at com.sun.jndi.cosnaming.CNCtx.lookup(CNCtx.java:373)
at com.sun.jndi.cosnaming.CNCtx.lookup(CNCtx.java:351)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at ejbdatabase.CustomerTestClient1.(CustomerTestClient1.java:19)
at ejbdatabase.CustomerTestClient1.main(CustomerTestClient1.java:44)
这是为什么呀!客户端可是向导产生的呀!
现在容器已经ready了,
运行客户端
出现一下问题:
javax.naming.NameNotFoundException. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound
at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(NotFoundHelper.java:34)
at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.extract(NotFoundHelper.java:50)
at org.omg.CosNaming._NamingContextStub.resolve(_NamingContextStub.java:161)
at com.sun.jndi.cosnaming.CNCtx.callResolve(CNCtx.java:324)
at com.sun.jndi.cosnaming.CNCtx.lookup(CNCtx.java:373)
at com.sun.jndi.cosnaming.CNCtx.lookup(CNCtx.java:351)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at ejbdatabase.CustomerTestClient1.(CustomerTestClient1.java:19)
at ejbdatabase.CustomerTestClient1.main(CustomerTestClient1.java:44)
这是为什么呀!客户端可是向导产生的呀!
|
即使在jb里面运行也需要发布了ejb才能运行,右键点击你的ejb的group文件,先择deploy,发布后再进入weblogic控制台激活,然后再运行你的客户端测试程序试试。
|
你的ejb发布了没有哇?