• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about RMI: Is RandomAccessFile serializable?

 
Yu Shi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Need help!
In my approach, Client extends Data implements Serializable,
I met a problem in RMI like this:
......
java.rmi.unmarshalException:error unmarshalling return; nested exception is: java.io.WriteAbortedException: Writing aborted by exception; java.io.NotSerializableException: java.io.RandomAccessFile
......
 
joey phillip
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am also getting same error. instead of extending the Data class i am directly using the Data class in DataClient class.
anyone knows what is wrong in our approach?
joey
 
David Touchshriek
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But what kind of design is that? Sounds pretty crazy...
 
Matt DeLacey
Ranch Hand
Posts: 318
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's no need to be that way just because you don't understand or agree with their approach. I don't quite understand either, though. Why do you implement Serializable if you are using RMI?
I don't believe that you need to do this. Perhaps this is part of your problem.
With Respect,
Matt
 
Judy Xu
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Only object which needs to be passed btw JVMs in RMI must be serialized.
Judy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic