我正在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
所有类文件都在同一目录中(包括存根文件),当我运行它时,localy没有问题。
任何人都知道这里发生了什么?
答案 0 :(得分:1)
如果查看堆栈跟踪,您可能会在那里看到bind()或rebind()。这表明相关的服务器是RMI注册表。它需要通过CLASSPATH访问您的类。
答案 1 :(得分:-1)
您是否运行过http服务器以将类传递给RMI服务器?