简体   繁体   English

java.rmi.UnmarshalException:无法识别的方法hash:远程对象不支持的方法

[英]java.rmi.UnmarshalException: unrecognized method hash: method not supported by remote object

I have two web application, the first one RMIServer contains the following 我有两个Web应用程序,第一个RMIServer包含以下内容

public interface EasyPDFGeneratorRemoteInterface extends Remote {

public File generatePDFAmin(File sourceFile) throws RemoteException ;
}

public class EasyPDFGenerator extends UnicastRemoteObject 
    implements EasyPDFGeneratorRemoteInterface {


    public File generatePDFAmin(File sourceFile)  {
//implementation details....
}

then an object of type EasyPDFGenerator is registered in the registry. 然后在注册表中注册EasyPDFGenerator类型的对象。

And the Second contains 第二个包含

public interface EasyPDFGeneratorRemoteInterface extends Remote {

public File generatePDFAmin(File sourceFile) throws RemoteException ;
}

class test {

private File generatePDF(File file) {

    File pdfFile = null;
    try {

        EasyPDFGeneratorRemoteInterface easyPDFGenerator = getRemoteEasyPDFGenerator();// get the remote object.
        easyPDFGenerator.getClass.getMethods();// the array contains the method generatePDFAmin.
        pdfFile = easyPDFGenerator.generatePDFAmin(file);// throws the exception.

    } catch (RemoteException ex) {

    }

}
}

I am not sure what could be causing the problem since am getting the remote object ,and it does contain the method that the UnmarshalException is thrown when it gets invoked. 我不确定是什么原因导致了此问题,因为正在获取远程对象,并且它确实包含调用UnmarshalException时抛出的方法。

You changed your remote interface definition without reploying all the .class files affected. 您无需重新部署所有受影响的.class文件即可更改了远程接口定义。 If you're using a generated stub, you didn't regenerate that either. 如果使用的是生成的存根,则也不会重新生成该存根。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 远程对象不支持RMI方法:java.rmi.UnmarshalException:无法识别的方法哈希 - RMI Method not supported by remote object: java.rmi.UnmarshalException: unrecognized method hash 获取java.rmi.UnmarshalException:无法识别的方法哈希:远程对象不支持的方法 - Getting java.rmi.UnmarshalException: unrecognized method hash: method not supported by remote object RMI 调用中的 java.rmi.UnmarshalException - java.rmi.UnmarshalException in RMI call ResultSet错误java.rmi.UnmarshalException - ResultSet Error java.rmi.UnmarshalException RMI客户端无法查找服务器-java.rmi.UnmarshalException - RMI client cannot lookup server - java.rmi.UnmarshalException java.rmi.UnmarshalException:无法通过服务器提取客户端类 - java.rmi.UnmarshalException: unable to pull client classes by server javax.ejb.EJBException:嵌套异常是:java.rmi.UnmarshalException:找不到方法:'helloWorld(Ljava.lang.Long; Ljava.util.List;)' - javax.ejb.EJBException: nested exception is: java.rmi.UnmarshalException: Method not found: 'helloWorld(Ljava.lang.Long;Ljava.util.List;)' java.rmi.UnmarshalException: 解组参数错误; 嵌套异常是:java.lang.ClassNotFoundException: ServicesTableau - java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: java.lang.ClassNotFoundException: ServicesTableau weblogic上下文查找错误:java.rmi.UnmarshalException:错误解组参数 - weblogic context lookup error : java.rmi.UnmarshalException: error unmarshalling arguments java.rmi.UnmarshalException:java.lang.ClassNotFoundException。 无法使用RMI从另一个物理JVM访问类 - java.rmi.UnmarshalException: java.lang.ClassNotFoundException. Can't get acces to class from another physical JVM using RMI
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM