当前位置: 技术问答>java相关
实战EJB,实体BEAN,怎么出了这个错误??怎么会找不到???
来源: 互联网 发布时间:2015-11-03
本文导语: 我出现以下错误啊?? javax.naming.NameNotFoundException: Unable to resolve EmployeesRemote. Resolved: '' Unresolved:'EmployeesRemote' ; remaining name '' at weblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:85) at weblogic.rmi.clust...
我出现以下错误啊??
javax.naming.NameNotFoundException: Unable to resolve EmployeesRemote. Resolved: '' Unresolved:'EmployeesRemote' ; remaining name ''
at weblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:85)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:253)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:220)-- Failed initializing bean access.
at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
at $Proxy0.lookup(Unknown Source)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:323)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at entitybean.EmployeesTestClient1.(EmployeesTestClient1.java:32)
at entitybean.EmployeesTestClient1.main(EmployeesTestClient1.java:1496)
java.lang.NullPointerException
at entitybean.EmployeesTestClient1.findByPrimaryKey(EmployeesTestClient1.java:128)
at entitybean.EmployeesTestClient1.main(EmployeesTestClient1.java:1497)
-- Calling findByPrimaryKey(1)
-- Failed: findByPrimaryKey(1)
-- Return value from findByPrimaryKey(1): null.
Error in testRemoteCallsWithDefaultArguments(): Remote interface reference is null. It must be created by calling one of the Home interface methods first.
怎么解决??
javax.naming.NameNotFoundException: Unable to resolve EmployeesRemote. Resolved: '' Unresolved:'EmployeesRemote' ; remaining name ''
at weblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:85)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:253)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:220)-- Failed initializing bean access.
at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
at $Proxy0.lookup(Unknown Source)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:323)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at entitybean.EmployeesTestClient1.(EmployeesTestClient1.java:32)
at entitybean.EmployeesTestClient1.main(EmployeesTestClient1.java:1496)
java.lang.NullPointerException
at entitybean.EmployeesTestClient1.findByPrimaryKey(EmployeesTestClient1.java:128)
at entitybean.EmployeesTestClient1.main(EmployeesTestClient1.java:1497)
-- Calling findByPrimaryKey(1)
-- Failed: findByPrimaryKey(1)
-- Return value from findByPrimaryKey(1): null.
Error in testRemoteCallsWithDefaultArguments(): Remote interface reference is null. It must be created by calling one of the Home interface methods first.
怎么解决??
|
你是在调用ejb出现错误的吧
提示好像是说要先create home接口
才能使用ejb remote远程接口的
提示好像是说要先create home接口
才能使用ejb remote远程接口的
|
楼上说的对,把你掉用ejb的代码铁出来。
|
客户端有这么写的么?
就是写个jsp也要复杂不少啊
如果你是按照csdn的例子,呵呵,好像是有错误的
还是好好学学才行
就是写个jsp也要复杂不少啊
如果你是按照csdn的例子,呵呵,好像是有错误的
还是好好学学才行
|
你的client.create();中的client是什么啊?
|
try :
client.getHome().create();
client.getHome().create();