错误信息:class sun.reflect.GeneratedSerializationConstructorAccessor1 cannot access its superclass sun.reflect.SerializationConstructorAccessorImpl 代码片段: ByteArrayOutputStream bs = new ByteArrayOutputStream(128); ObjectOutputStream dos = new ObjectOutputStream(bs); dos.writeObject(this); //此处报错 ByteArrayInputStream is = new ByteArrayInputStream(bs.toByteArray()); ObjectInputStream ios = new ObjectInputStream(is); Object copy = ios.readObject();
上述代码报错,在copy对象时。已知对象已实现序列化接口。
项目:JFinal