RMI Serialization problem of Applet
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Carfield_Yim
Posted On:   Thursday, July 26, 2001 05:26 AM

I have a java application that want to port to a applet project. It run fine when it as application, but when I port it to applet, the object serialization have problem, seem to me that it is a object serialization problem. It occur when I ask RMI server open a file at server computer and transfer it to applet for display. However, the problem occur at a stub class generate by rmic, so I can't read the source code and check which line have problem, even I use a decompiler to decompiler the class. Anyone have recommendation of debugging in this case? As there is a UnmarshalException, and it only occur when ask server to open a file, I suppose this is a serialization problem. I also    More>>
			
I have a java application that want to port to a applet project. It run
fine when it as application, but when I port it to applet, the object
serialization have problem, seem to me that it is a object serialization
problem. It occur when I ask RMI server open a file at server computer
and transfer it to applet for display.
However, the problem occur at a stub class generate by rmic, so I can't
read the source code and check which line have problem, even I use a
decompiler to decompiler the class. Anyone have recommendation of
debugging in this case?
As there is a UnmarshalException, and it only occur when ask server to
open a file, I suppose this is a serialization problem. I also find that
there is only one object transfer believe client and server of the
related method, which is already implement Serializable. So I would like
to ask, under what situation that the object can't transfer throught
client and server even it implement Serializable? Can anyone point me to
a suitable place to study?


Below is the result of printStackTrace():

[java] java.rmi.UnmarshalException: Error unmarshaling return;
nested exception is:
[java] java.net.SocketException: Broken pipe: Broken pipe
[java] java.net.SocketException: Broken pipe: Broken pipe
[java] at java.net.SocketInputStream.socketRead(Native Method)
[java] at
java.net.SocketInputStream.read(SocketInputStream.java(Compiled Code))
[java] at
java.io.BufferedInputStream.fill(BufferedInputStream.java(Compiled
Code))
[java] at
java.io.BufferedInputStream.read(BufferedInputStream.java(Compiled
Code))
[java] at
java.io.ObjectInputStream.peekCode(ObjectInputStream.java(Compiled
Code))
[java] at
java.io.ObjectInputStream.skipToEndOfBlockData(ObjectInputStream.java(Compiled
Code))
[java] at
java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java(Compiled
Code))
[java] at
java.io.ObjectInputStream.readObject(ObjectInputStream.java(Compiled
Code))
[java] at
java.io.ObjectInputStream.readObject(ObjectInputStream.java(Compiled
Code))
[java] at
java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java(Compiled
Code))
[java] at
java.io.ObjectInputStream.readObject(ObjectInputStream.java(Compiled
Code))
[java] at
java.io.ObjectInputStream.inputObject(ObjectInputStream.java(Compiled
Code))
[java] at
java.io.ObjectInputStream.inputObject(ObjectInputStream.java(Compiled
Code))
[java] at
java.io.ObjectInputStream.readObject(ObjectInputStream.java(Compiled
Code))
[java] at
java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java(Compiled
Code))
[java] at
java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java(Compiled
Code))
[java] RemoteException thrown: broadcastLoad=1
[java] at
java.io.ObjectInputStream.inputObject(ObjectInputStream.java(Compiled
Code))
[java] RemoteException thrown: broadcastLoad=2
[java] at
java.io.ObjectInputStream.readObject(ObjectInputStream.java(Compiled
Code))
[java] at
java.io.ObjectInputStream.readObject(ObjectInputStream.java(Compiled
Code))
[java] at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:215)

[java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:128)
[java] at
editor.uml.gui.appobj.WorkSpace_Stub.setLoad(WorkSpace_Stub.java:354)
[java] at editor.uml.remote.remoteImpl.Load(remoteImpl.java:765)
[java] at java.lang.reflect.Method.invoke(Native Method)
[java] at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:242)
[java] at sun.rmi.transport.Transport$1.run(Transport.java:155)
[java] at java.security.AccessController.doPrivileged(Native
Method)
[java] at
sun.rmi.transport.Transport.serviceCall(Transport.java:152)
[java] at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:462)

[java] at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:662)

[java] at java.lang.Thread.run(Thread.java:498)
[java] java.rmi.MarshalException: error marshalling arguments;
nested exception is:
[java] java.io.IOException: Broken pipe
[java] java.io.IOException: Broken pipe
[java] at java.net.SocketOutputStream.socketWrite(Native Method)
[java] at
java.net.SocketOutputStream.write(SocketOutputStream.java(Compiled
Code))
[java] at
java.io.BufferedOutputStream.write(BufferedOutputStream.java(Compiled
Code))
[java] at
java.io.BufferedOutputStream.write(BufferedOutputStream.java(Compiled
Code))
[java] at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java(Compiled
Code))
[java] RemoteException thrown: broadcastLoad=3
[java] at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java(Compiled
Code))
[java] at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java(Compiled
Code))
[java] at
sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:274)
[java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:112)
[java] at
editor.uml.gui.appobj.WorkSpace_Stub.setLoad(WorkSpace_Stub.java:354)
[java] at editor.uml.remote.remoteImpl.Load(remoteImpl.java:765)
[java] at java.lang.reflect.Method.invoke(Native Method)
[java] at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:242)
[java] at sun.rmi.transport.Transport$1.run(Transport.java:155)
[java] at java.security.AccessController.doPrivileged(Native
Method)
[java] at
sun.rmi.transport.Transport.serviceCall(Transport.java:152)
[java] at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:462)

[java] at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:662)

[java] at java.lang.Thread.run(Thread.java:498)
[java] java.rmi.MarshalException: error marshalling arguments;
nested exception is:
[java] java.io.IOException: Broken pipe
[java] java.io.IOException: Broken pipe
[java] at java.net.SocketOutputStream.socketWrite(Native Method)
[java] at
java.net.SocketOutputStream.write(SocketOutputStream.java(Compiled
Code))
[java] at
java.io.BufferedOutputStream.write(BufferedOutputStream.java(Compiled
Code))
[java] at
java.io.BufferedOutputStream.write(BufferedOutputStream.java(Compiled
Code))
[java] at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java(Compiled
Code))
[java] at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java(Compiled
Code))
[java] at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java(Compiled
Code))
[java] at
sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:274)
[java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:112)
[java] at
editor.uml.gui.appobj.WorkSpace_Stub.setLoad(WorkSpace_Stub.java:354)
[java] at editor.uml.remote.remoteImpl.Load(remoteImpl.java:765)
[java] at java.lang.reflect.Method.invoke(Native Method)
[java] at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:242)
[java] at sun.rmi.transport.Transport$1.run(Transport.java:155)
[java] at java.security.AccessController.doPrivileged(Native
Method)
[java] at
sun.rmi.transport.Transport.serviceCall(Transport.java:152)
[java] at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:462)

[java] at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:662)

[java] at java.lang.Thread.run(Thread.java:498)


   <<Less
About | Sitemap | Contact