title: java.rmi.UnmarshalException: unrecognized method hash: method not supported by remote object
body: <p>I have two web application, the first one RMIServer contains the following</p>
  
  <pre><code>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....
  }
  </code></pre>
  
  <p>then an object of type EasyPDFGenerator is registered in the registry.</p>
  
  <p>And the Second contains </p>
  
  <pre><code>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) {
  
      }
  
  }
  }
  </code></pre>
  
  <p>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.</p>