Having just submitted my project successfuly today, I think I can answer these.
your object and hostname are being accessed from your static main() method. This is not allowed: static methods can ONLY access class variables (i.e. fellow statics), becuase there is no this.
When you pass parameters, for them to be recognized by RMI at all, they must fall into one of the following 2 categories:-
a) they must be remote objects, or if not,
b) they must be serializable (i.e. implement the Serializable Marker Interface).
Any parameters passed or retrieved which don't satisfy either of these criteria will fail.
The remote objects get passed by "reference" i.e. the receiver receives a stub which communicates with the actual object on the other side of the wire, whereas the serializable ones get passed by "value" i.e. they're serialized at the sending end and deserialized at the receiving end which is thus a copy.
Hope these comments help.