I'm sorry if this question has already been asked. I need at runtime to serialize a running object (I have to keep the state of the object) and make a CtClass from the serialized object and make some changes to it and load the new modified class.
I think it is an independent issue of Javassist. As far as I know, the Java's deserializer checks the version of the class file is the same as the original. So if you try to deserialize an object with a new version of the class, the deserializer will throw an exception.