Exception in thread "main" java.io.NotSerializableException: HouseSurvey at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330) at HouseSurvey.doPost(HouseSurvey.java:36) at HouseSurvey.main(HouseSurvey.java:9)
/** * Write the non-static and non-transient fields of the current class to * this stream. This may only be called from the writeObject method of the * class being serialized. It will throw the NotActiveException if it is * called otherwise. * * @throws IOException if I/O errors occur while writing to the underlying * <code>OutputStream</code> */ public void defaultWriteObject() throws IOException { if ( curContext == null ) { throw new NotActiveException("not in call to writeObject"); } Object curObj = null; // curContext.getObj(); ObjectStreamClass curDesc = null; // curContext.getDesc(); bout.setBlockDataMode(false); defaultWriteFields(curObj, curDesc); bout.setBlockDataMode(true); }
/** * Write the non-static and non-transient fields of the current class to * this stream. This may only be called from the writeObject method of the * class being serialized. It will throw the NotActiveException if it is * called otherwise. * * @throws IOException if I/O errors occur while writing to the underlying * <code>OutputStream</code> */ public void defaultWriteObject() throws IOException { if ( curContext == null ) { throw new NotActiveException("not in call to writeObject"); } Object curObj = null; // curContext.getObj(); ObjectStreamClass curDesc = null; // curContext.getDesc(); bout.setBlockDataMode(false); defaultWriteFields(curObj, curDesc); bout.setBlockDataMode(true); }
defaultWriteFields(obj, slotDesc);
defaultWriteFields(obj, slotDesc);