Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.rmi.UnmarshalException: Please Help

 
Praveen Reddy
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
getting the following exception when i run my application

java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.io.InvalidClassException: jisp.base.RateGroupInfo; Local class not compatible: stream classdesc serialVersionUID=-4194683926821053521 local class serialVersionUID=-4463005701135703527

java.io.InvalidClassException: jisp.base.RateGroupInfo; Local class not compatible: stream classdesc serialVersionUID=-4194683926821053521 local class serialVersionUID=-4463005701135703527

at java.io.ObjectStreamClass.validateLocalClass(Unknown Source)

at java.io.ObjectStreamClass.setClass(Unknown Source)

at java.io.ObjectInputStream.inputClassDescriptor(Unknown Source)

at java.io.ObjectInputStream.readObject(Unknown Source)

at java.io.ObjectInputStream.readObject(Unknown Source)

at java.io.ObjectInputStream.inputClassDescriptor(Unknown Source)

at java.io.ObjectInputStream.readObject(Unknown Source)

at java.io.ObjectInputStream.readObject(Unknown Source)

at java.io.ObjectInputStream.inputObject(Unknown Source)

at java.io.ObjectInputStream.readObject(Unknown Source)

at java.io.ObjectInputStream.inputArray(Unknown Source)

at java.io.ObjectInputStream.readObject(Unknown Source)

at java.io.ObjectInputStream.inputClassFields(Unknown Source)

at java.io.ObjectInputStream.defaultReadObject(Unknown Source)

at java.io.ObjectInputStream.inputObject(Unknown Source)

at java.io.ObjectInputStream.readObject(Unknown Source)

at java.io.ObjectInputStream.readObject(Unknown Source)

at sun.rmi.server.UnicastRef.unmarshalValue(Unknown Source)

at sun.rmi.server.UnicastRef.invoke(Unknown Source)

at jisp.cvms.server.CVMSRateGroupManagerImpl_Stub.getByRateGroupID(Unknown Source)

at jisp.base.client.GuiDataProvider.getRategroupsFromViewInfo(GuiDataProvider.java:2143)

at jisp.base.client.GuiDataProvider.getRategroup(GuiDataProvider.java:1973)

at jisp.base.client.GuiDataProvider.getRategroupWithService(GuiDataProvider.java:2119)

at jisp.base.client.GeneralRateGroupScreen.openScreen(Unknown Source)

at jisp.base.client.DefaultScreen$OpenGuiOperation.execute(DefaultScreen.java:65)

at jisp.base.client.BaseInternalFrame$1.actionPerformed(Unknown Source)

at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)

at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)

at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)

at javax.swing.DefaultButtonModel.setPressed(Unknown Source)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)

at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)

at java.awt.Component.processMouseEvent(Unknown Source)

at java.awt.Component.processEvent(Unknown Source)

at java.awt.Container.processEvent(Unknown Source)

at java.awt.Component.dispatchEventImpl(Unknown Source)

at java.awt.Container.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)

at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)

at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)

at java.awt.Container.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.run(Unknown Source)



what could be the possible error please help me
Thanks in advance
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The server JVM has a different version of class " jisp.base.RateGroupInfo" than the client.
You have to sync the class definitions both at the server side and client.
Mostly, people specify the serialVersionUID field in the serializable classes to avoid this problem.
 
Praveen Reddy
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Nitesh

if you dont mind can you tell me bit more clear how to specify serialVersionUID field in the serializable classes i am new to this RMI concept so struck up here. please help me out to solve this task.

Thanks for the help
praveen
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Following articles give you the insight and example:
java practice
java rmi book(oreilly)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic