title: RMI exception "error marshalling arguments"
body: <p>I'm working on a RMI project that has two separated projects for Client and Server. I used start rmiregistry. When I try to run my Server application, I get an exception.</p>
  
  <pre><code>public class Runner extends UnicastRemoteObject {
  
      public Runner() throws RemoteException {
          try {
              ServerOperations so = new ServerSide();
              Naming.rebind("rmi://localhost:2000/MiveCoffeeService", so);
              System.out.println("Server is online.");
  
          } catch (RemoteException | MalformedURLException | FileNotFoundException ex) {
              Logger.getLogger(Runner.class.getName()).log(Level.SEVERE, null, ex);
          }
      }
  
      public static void main(String[] args) throws RemoteException {
          new Runner();
      }
  
  }
  </code></pre>
  
  <p>The exceptions are:</p>
  
  <pre><code>Sep 11, 2015 9:05:51 PM ir.nscogroup.coffeemive.Runner &lt;init&gt;
  SEVERE: null
  java.rmi.MarshalException: error marshalling arguments; nested exception is: 
      java.io.NotSerializableException: dataaccess.ServerSide
      at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
      at java.rmi.Naming.rebind(Naming.java:177)
      at ir.nscogroup.coffeemive.Runner.&lt;init&gt;(Runner.java:29)
      at ir.nscogroup.coffeemive.Runner.main(Runner.java:38)
  Caused by: java.io.NotSerializableException: dataaccess.ServerSide
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
      ... 4 more
  </code></pre>
  
  <p>What is wrong?</p>