Java Serialization Exception Message

前端 未结 3 1698
走了就别回头了
走了就别回头了 2021-01-26 13:08

When running an application locally on my box, the application works perfectly. When deployed to QA, the error below is received. I am running Tomcat 5.5.23 locally and in QA. T

3条回答
  •  一个人的身影
    2021-01-26 14:00

    This means you have put an object in the session that is not serializable, and you have enabled session persistence on server stop.

    You have multiple options:

    • make the class in question implement Serializable
    • remove it from the session on sessionDestroyed(..) of a HttpSessionListener
    • if it is a member of another class stored in the session, make it transient
    • simply ignore the error

    You should also clean the "work" directory of tomcat so that no previous serialized session is restored.

提交回复
热议问题