RMI and String marshalling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Lorenz Witte writes:
>  > Andrew Haley wrote:
>  > > Lorenz Witte writes:
>  > >  > I have a problem sending strings over RMI. I run a client that passes 
>  > >  > over a string via RMI to a server. The server does nothing except 
>  > >  > returning the same string. It works fine if the server is run on a Sun 
>  > >  > VM. Using JamVM (or Kaffe) with GNU Classpath leads to exceptions on the 
>  > >  > client side if the strings are longer than 65535 (ASCII) characters. The 
>  > >  > following exception is caused:
>  > >  > 
>  > >  > Client exception: java.rmi.MarshalException: error marshalling 
>  > >  > arguments; nested exception is:
>  > >  >         java.net.SocketException: Broken pipe
>  > >  > java.rmi.MarshalException: error marshalling arguments; nested exception is:
>  > >  >         java.net.SocketException: Broken pipe
>  > >  >         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:129)
>  > >  >         at com.actia.rmi.strings.RMIServerImpl_Stub.InOut(Unknown Source)
>  > >  >         at com.actia.rmi.strings.Client.TransmitString(Client.java:45)
>  > >  >         at com.actia.rmi.strings.Client.main(Client.java:104)
>  > >  > Caused by: java.net.SocketException: Broken pipe
>  > >  >         at java.net.SocketOutputStream.socketWrite0(Native Method)
>  > >  >         at 
>  > >  > java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
>  > >  >         at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
>  > >  >         at java.io.BufferedOutputStream.write(BufferedOutputStream.java:106)
>  > >  >         at 
>  > >  > java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1639)
>  > >  >         at 
>  > >  > java.io.ObjectOutputStream$BlockDataOutputStream.writeByte(ObjectOutputStream.java:1677)
>  > >  >         at 
>  > >  > java.io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java:1354)
>  > >  >         at 
>  > >  > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:281)
>  > >  >         at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:265)
>  > >
>  > > You don't appear to be using GNU Classpath's RMI implementation: this
>  > > should be gnu.java.rmi.server.UnicastRef.
>
>  > Yes, the error occurrs on the client side, i.e. the side where I run a 
>  > Sun JDK. This error, however, only occurs if the server is running GNU 
>  > Classpath.
>
> So it must be our fault, then.  :-)
>
>  > It seems like a communication error that pops up on the client
>  > side.
>
> Well, we need to know what's happening.  It's hard to be sure with so
> little information.
>
> tcpdump might tell us what is going wrong.   Alternatively, strace.
>
> Andrew.
>   
Unfortunately I don't have much time to investigate, but I will post an 
example code soon (have a load of other stuff to do right now).

Lorenz




[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux