Have you implemented the Serializable interface?