Re: Unmarshaling Exception
Peter Jones - JavaSoft East <[email protected]>
| Newsgroups | gmane.comp.java.sun.rmi |
|---|---|
| Message-ID | <20041203005624.GG23911@east> |
> I am using a state management application that sends the state change
> requests to processes through RMI.
> The problem is that I am getting the following exception and have no clue
> abt it.
>
> java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
> java.net.SocketException: Connection reset
>
> at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:203)
> at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
> at com.hns.hss.nmf.common.pautil.PaProcessRmiImplBase_Stub.stateChangeReq(Unknown Source)
> at com.hns.hss.nmf.server.pa.impl.PaStateChangeReqThread.run(PaBackendRmiImpl.java:307)
> Caused by: java.net.SocketException: Connection reset
> at java.net.SocketInputStream.read(SocketInputStream.java:168)
> at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
> at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
> at java.io.DataInputStream.readByte(DataInputStream.java:331)
> at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:189)
Does this same exception always occur for the same invocation (same
remote object, method, and argument values, from the same client)?
Even on successive attempts? Do you know whether or not it also
occurs with different argument values, or a different method on the
same remote object, or a different remote object, or from a different
client host?
It could also be useful to know the J2SE implementation version and
operating system on both sides.
This exception generally indicates that the server side (i.e. the
virtual machine with the remote object being invoked) unexpectedly
closed its socket while the remote invocation request data was being
sent (the socket for the incoming connection over which the invocation
was being communicated).
Here are a couple of possible causes for this happening (this is not
intended to be an exhaustive list):
- It could happen if the server process terminated for some reason.
- It could happen if the access control context in which the remote
object was exported does not have the "accept" SocketPermission
necessary to accept communication from this caller's host address.
(If the same caller had successfully invoked this remote object
earlier, then this wouldn't seem to be the case.)
Is there any anomalous console output from the server VM around when
this failure occurs?
Additional server-side logging might provide a clue. I would suggest
either configuring the level of the logger "sun.rmi.server.call" down
(at least) to Level.FINE, or just making the following system property
setting:
-Dsun.rmi.server.exceptionTrace=true
which causes server-side stack traces of exceptions that get thrown
from processing remote method invocations to be printed to System.err.
For more information about system properties observed by the RMI
implementation, see:
http://java.sun.com/j2se/1.5.0/docs/guide/rmi/javarmiproperties.html
http://java.sun.com/j2se/1.5.0/docs/guide/rmi/sunrmiproperties.html
For more information about java.util.logging loggers used by the RMI
implementation, see:
http://java.sun.com/j2se/1.5.0/docs/guide/rmi/logging.html
-- Peter
===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff RMI-USERS". For general help, send email to
[email protected] and include in the body of the message "help".
For a list of frequently asked RMI questions please refer to:
http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html
To view past RMI-USERS postings, please see:
http://archives.java.sun.com/archives/rmi-users.html