File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Distributed Java and the fly likes java.rmi.UnmarshalException:  Please Help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "java.rmi.UnmarshalException:  Please Help" Watch "java.rmi.UnmarshalException:  Please Help" New topic
Author

java.rmi.UnmarshalException: Please Help

Praveen Reddy
Ranch Hand

Joined: Jul 12, 2006
Posts: 51
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

Joined: Feb 25, 2007
Posts: 1638

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.


apigee, a better way to API!
Praveen Reddy
Ranch Hand

Joined: Jul 12, 2006
Posts: 51
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

Joined: Feb 25, 2007
Posts: 1638

Following articles give you the insight and example:
java practice
java rmi book(oreilly)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.rmi.UnmarshalException: Please Help