I am using serialization to communicate with my server. This way My applet retrieves a JTree created in the server. In eclipse and appletViewer my applet works perfectly but when I try to launch my applet from my server I got this error on my console
java.io.InvalidClassException: javax.swing.JComponent; local class
incompatible: stream classdesc serialVersionUID = 5858390075012080263,
local class serialVersionUID = -1030230214076481435
I tried to get serialVersionUID for every class of my project with serialver but none of them have serialVersionUID = 5858390075012080263.
the error is occuring when I try to deserialize my object .
In addition to this ,the error says
java.io.InvalidClassException: javax.swing.JComponent.
How to determine the JComponent that causes this error? Is it my JTree? How can I set the serialVersionUID? By creating a class that extends this JComponent and set the serialVersionUID?
Problem solved. I have 4 different JREs on my system. It was a problem with the JVM itself not my classes. Now I use the same JRE everywhere and everything works fine .