0

我在 VM 上运行 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

所有的类文件都在同一个目录中(包括存根文件),当我在本地运行它时没有问题。

有人知道这里发生了什么吗?

4

2 回答 2

1

如果您查看堆栈跟踪,您可能会在下面看到 bind() 或 rebind()。这表明相关的服务器是 RMI Registry。它需要通过它的 CLASSPATH 访问你的类。

于 2011-03-04T00:28:22.070 回答
-1

您是否运行过 http 服务器来向 RMI 服务器提供课程?

于 2011-03-03T23:43:30.407 回答