为什么找不到我的存根类?
我在虚拟机上运行 RMI 服务器,但不断收到此错误:
Failure during Name registration: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: MarketBBImpl_Stub
Failure during Name registration: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: AMPLocation_Stub
所有类文件都在同一目录中(包括存根文件),并且当我在本地运行它时没有问题。
有人知道这是怎么回事吗?
I am running an RMI server on a VM, but I keep getting this error:
Failure during Name registration: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: MarketBBImpl_Stub
Failure during Name registration: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: AMPLocation_Stub
All of the class files are in the same directory(including the stub files), and when I run it localy there are no problems.
Anyone know what's going on here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您查看堆栈跟踪,您可能会在下面看到 bind() 或 rebind() 。这表明相关服务器是 RMI 注册表。它需要通过其 CLASSPATH 访问您的类。
If you look at the stack trace you will probably see bind() or rebind() down there. That indicates that the server concerned is the RMI Registry. It needs access to your classes via its CLASSPATH.
您是否运行了 http 服务器来将类传递给 RMI 服务器?
Have you run http server to deliver classes to RMI server?