我刚刚开始并运行了RMI的第一个基本示例.. 处理许多问题我终于从客户端和服务器端运行ma项目但是当我在不同的m / c上运行客户端时,我得到了例外。
Computeappengine exceptionCompute
java.rmi.NotBoundException: Compute
at sun.rmi.registry.RegistryImpl.lookup(RegistryImpl.java:114)
at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:390)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:248)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:359)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Naming.java:84)
at Client.computeappprog.main(computeappprog.java:21)
但是当客户端和服务器在同一个m / c上运行时,没有问题。 我必须提一下,我的vmware工具帮助有一个服务器m / c 所有防火墙都关闭了....
答案 0 :(得分:2)
远程客户端无法连接
没有。错误的标题;错误的诊断。阅读例外情况。远程客户端无法查找。这不是一回事。
这意味着您查找的远程对象在您查找的注册表中不受该名称的约束。之一: