RemoteException java.rmi.UnmarshalException:错误解组返回 [英] RemoteException java.rmi.UnmarshalException: error unmarshalling return

查看:281
本文介绍了RemoteException java.rmi.UnmarshalException:错误解组返回的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行程序这里在差异物理机器上的2个JVM上。我收到错误

  RemoteException 
java.rmi.UnmarshalException:error unmarshalling return;嵌套异常是:
java.lang.ClassNotFoundException:CalculatorImpl_Stub(没有安全管理器:禁用RMI类加载器)

我甚至尝试在同一台机器上运行它(未更改的程序)并且它可以工作但它在diff机器上不起作用。有人可以帮助我吗?



@ beny23-谢谢,但我仍然会遇到这个错误:

  RemoteException 
java.rmi.UnmarshalException:error unmarshalling return;嵌套异常是:
java.lang.ClassNotFoundException:CalculatorImpl_Stub

客户端如何拥有CalculatorImpl_stub的副本?

解决方案

听起来你没有使用安全管理器:



您是否有政策文件( my.policy ):

  grant {
permission java.security.AllPermission;
};

并使用



<$ p $运行程序p> java -Djava.security.manager -Djava.security.policy = / some / path / my.policy MyClass


I'm running the program here on 2 JVMs on diff physical machines. I get the error

RemoteException
java.rmi.UnmarshalException: error unmarshalling return; nested exception is: 
    java.lang.ClassNotFoundException: CalculatorImpl_Stub (no security manager: RMI class loader disabled)

I've even tried running it on the same machine(unchanged program) and it works but it doesnt work on diff machines. Can someone pls help me out?

@beny23- Thanks but I still end up with this error:

RemoteException
java.rmi.UnmarshalException: error unmarshalling return; nested exception is: 
java.lang.ClassNotFoundException: CalculatorImpl_Stub

How can the client side have a copy of CalculatorImpl_stub?

解决方案

It sounds like your not using a security manager:

Have you got a policy file (my.policy):

grant {
  permission java.security.AllPermission;
};

and run your program using

java -Djava.security.manager -Djava.security.policy=/some/path/my.policy MyClass

这篇关于RemoteException java.rmi.UnmarshalException:错误解组返回的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆