• Post Reply Bookmark Topic Watch Topic
  • New Topic

Bizarre RMI problem

 
Ewan Slater
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have two classes, both of which extend UnicastRemote object (and so should both be remote).

When I get one (it's a skeleton test class) from the server, no problem.

When I get the other one (containing real business logic) from the server I get :

java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.io.EOFException
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:157)
at etc.dmz.AgentFactory_Stub.getReconAgent(Unknown Source)
at etc.oim.TestTask.execute(TestTask.java:37)
at etc.oim.TestClient.main(TestClient.java:16)
Caused by: java.io.EOFException
at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2502)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1267)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:290)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:139)

Which is pretty bizarre - as they both extend UnicastRemoteObject, serializable shouldn't enter it. Even wierder, this is happening when I run the server in a VM. If I run server and client on my laptop - no problem.

Any insights would be appreciated.

Cheers,

Ewan
 
Ewan Slater
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BTW, both implement an interface that extends Remote as well
 
Mr. C Lamont Gilbert
Ranch Hand
Posts: 1170
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are the objects being exported. They will be automatically serialized if they are not exported.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!