A developer declared this in a class which implements Serializable
interface.
XmlAccessorType(XmlAccessType.FIELD)
@XmlType(namespace = "http://employer.webservicedto.dto.com", name = employerRequestDTO")
public class EmployerRequestDTO implements Serializable{
private static final long serialVersionUID = -3956940714175091216L;
// all private instance variables with getters & setters
}
and the stacktrace says -
decodeRequestData - Exception in decodeReqData() : java.io.InvalidClassException: EmployerRequestDTO; local class incompatible: stream classdesc serialVersionUID = -3551130751187195282, local class serialVersionUID = -3956940714175091216
/**
* This method de-serializes user's request-data to return respective DTOs
*/
public static Object decodeRequestData(String requestData, String userType){
Object userRequestDTO = null;
try{
byte[] b = Base64.decode(requestData);
ByteArrayInputStream bi = new ByteArrayInputStream(b);
ObjectInputStream si = new ObjectInputStream(bi);