Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

getting ClassCastException after changing code in RMI on server side  RSS feed

 
spratap singh
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am getting a ClassCastException when I add some methods in the remote bean on the server side, even when I do not use the new methods from the client.When I build the client classes again the problem goes away.

The problem is faced when I add some new methods,not when I change the existing methods.

Please help.
Any pointers are appreciated.


Thanks in advance,
Sumit
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds like you need to make use of serialVersionUID to make sure that newer versions of classes are compatible with older versions.
 
spratap singh
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Nathan,

Thats the answer to my query.

Thanks again,
-Sumit
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!