Forum Stats

  • 3,741,235 Users
  • 2,248,398 Discussions
  • 7,861,694 Comments

Discussions

"Error unmarshaling return header", but return type is void

843793
843793 Member Posts: 41,732 Green Ribbon
edited Aug 19, 2002 4:25PM in Remote Method Invocation (RMI)

I don't understand this. My remote call works, but the calling code gets an exception.

The remote method has this signature:
public void mymethod(Object value) throws RemoteException;
- The code/process that implements mymethod has logging statements that appear in the log, so I know that it is successfully getting called, printing stuff about value, and getting to the end.

- The code/process that calls mymethod gets this exception from the remote call:
java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
    java.io.EOFException
java.io.EOFException
    at java.io.DataInputStream.readByte(DataInputStream.java:219)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:181)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:117)
    at MyRemoteClass.mymethod
    ... (rest is my code)
Maybe it's because I do not understand what it means by "unmarshaling return header", but it doesn't sound to be like it should be trying to unmarshal anything when the return type is void.

??!!!??!?!
Anyone?

/Mel

Comments

  • 843793
    843793 Member Posts: 41,732 Green Ribbon

    Oh jeez-o-petes. Here's what it was: I had a System.exit in the remote method.

    (I was also sometimes getting SocketException instead of UnmarshalException, depending upon whether this process had started the registry or not.)

    But it turned out that System.exit was getting called from the remote method, thus shutting down the server process (and its sockets) before it properly returned; that would account for the problems.

    I hope maybe someone else can benefit from this uniquely silly troubleshooting experience.

    /Mel
This discussion has been closed.