Hi!
I am trying to read a some kind of complex serialized object from a stream. Here is the object's class:
While trying to read the object from the stream I get an InvalidClassException whenever I used the setReloadScheduleTableModel() methode before writing the object to the stream. The ReloadScheduleTableModel is a class that extends the DefaultTableModel. If I don't set the model at all then I can read the object. I can even read the object if I did something like setReloadScheduleTableModel(new ReloadScheduleTableModel()) but as soon as I set a object of ReloadScheduleTableModel that has been manipulated in any way before I will get the exception.
Here ist the exception:
We are talking about a client-server-application and I already tried to compile everything on the server-side and copy the class-files to the client but this didn't work. This was a tip I read in the SUN-forum.
I hope I explained my problem in a understandable way...
As always... any help is welcome.
Cheers
frag
patrick.metz@epost.de
I am trying to read a some kind of complex serialized object from a stream. Here is the object's class:
Code:
public class ReloadScheduleObj implements Serializable
{
// *** object related varibles ***
private String strSubimportKey;
private String strSource;
private String strCalculateAggs;
private ReloadScheduleTableModel tmReloadSchedule;
// *** gerneral varibles ***
private int iReturnCode;
private int a,x = 0;
public ReloadScheduleObj()
{
strSubimportKey = "";
strSource = "";
strCalculateAggs = "0";
tmReloadSchedule = null;
iReturnCode = -1;
}
// *** set and get methodes for object related variables ***
public void setSubimportKey(String value){ strSubimportKey = value; }
public String getSubimportKey(){ return strSubimportKey; }
public void setSource(String value){ strSource = value; }
public String getSource(){ return strSource; }
public void setCalculateAggs(String value){ strCalculateAggs = value; }
public String getCalculateAggs(){ return strCalculateAggs; }
public void setReloadScheduleTableModel(ReloadScheduleTableModel value){ tmReloadSchedule = value; }
public ReloadScheduleTableModel getReloadScheduleTableModel(){ return tmReloadSchedule; }
public ReloadScheduleTableModel updateTableModel(ReloadScheduleTableModel tm){ }
// *** set and get methodes for general variables ***
public void setReturnCode(int value){ iReturnCode = value; }
public int getReturnCode(){ return iReturnCode; }
}
While trying to read the object from the stream I get an InvalidClassException whenever I used the setReloadScheduleTableModel() methode before writing the object to the stream. The ReloadScheduleTableModel is a class that extends the DefaultTableModel. If I don't set the model at all then I can read the object. I can even read the object if I did something like setReloadScheduleTableModel(new ReloadScheduleTableModel()) but as soon as I set a object of ReloadScheduleTableModel that has been manipulated in any way before I will get the exception.
Here ist the exception:
Code:
java.io.InvalidClassException: javax.swing.JComponent; local class incompatible: stream classdesc serialVersionUID = -5353880800724033550, local class serialVersionUID = 5896976265092562486
We are talking about a client-server-application and I already tried to compile everything on the server-side and copy the class-files to the client but this didn't work. This was a tip I read in the SUN-forum.
I hope I explained my problem in a understandable way...
As always... any help is welcome.
Cheers
frag
patrick.metz@epost.de