为什么找不到我的存根类?

发布于 2024-10-20 08:39:52 字数 656 浏览 6 评论 0原文

我在虚拟机上运行 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

等你爱我 2024-10-27 08:39:52

如果您查看堆栈跟踪,您可能会在下面看到 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.

暖伴 2024-10-27 08:39:52

您是否运行了 http 服务器来将类传递给 RMI 服务器?

Have you run http server to deliver classes to RMI server?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文