简体   繁体   English

客户端的RMI可激活错误

[英]RMI Activatable error with client

I've followed following tutorial to make my RMI stuff Activatable http://docs.oracle.com/javase/1.4.2/docs/guide/rmi/activation/activation.2.html 我已按照以下教程进行操作,以使我的RMI东西可激活http://docs.oracle.com/javase/1.4.2/docs/guide/rmi/activation/activation.2.html

So i start the registry, run the rmid, and run the server. 所以我启动注册表,运行rmid,然后运行服务器。 This all goes just fine. 这一切都很好。

When i try to connect the Client i get the following Exception: 当我尝试连接客户端时,出现以下异常:

java.rmi.activation.ActivateFailedException: activation failed; nested exception is: 
java.rmi.activation.ActivationException: unable to activate object; nested exception is: 
java.lang.ClassNotFoundException: server.Service
at sun.rmi.server.ActivatableRef.activate(ActivatableRef.java:285)
at sun.rmi.server.ActivatableRef.invoke(ActivatableRef.java:114)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:178)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132)
at $Proxy0.register(Unknown Source)
at client.BasicClient.<init>(BasicClient.java:27)
at client.NormalClient.<init>(NormalClient.java:11)
at client.ShippingClient.main(ShippingClient.java:24)

the webserver i run also contains the bin folder of my Server project. 我运行的Web服务器还包含Server项目的bin文件夹。

I would also like to point out that, when everything was UnicastRemoteObject based, it all worked (and still does work) fine ! 我还要指出的是,当所有内容都基于UnicastRemoteObject时,一切正常(并且仍然有效)!

Thanks in advance 提前致谢

java.lang.ClassNotFoundException: server.Service

There's your answer right there. 在那里有您的答案。 The client, or possibly rmid, can't find that class. 客户端,或者可能是rmid,找不到该类。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM