I deployed my Vaadin application on Tomcat and it is from time to time throwing the following exception:
28-Mar-2023 21:33:32.448 WARNING [http-nio-8080-exec-48] org.apache.catalina.session.StandardSession.doWriteObject Cannot serialize session attribute [com.vaadin.flow.server.VaadinSession.springServlet] for session [E0E11430F24C7B870DF2E047CD4D76BC] java.io.NotSerializableException: org.garik.encyclopedia.util.ApiBookUtils at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1192) ...
It happens for various classes
28-Mar-2023 19:00:46.492 WARNING [http-nio-8080-exec-32] org.apache.catalina.session.StandardSession.doWriteObject Cannot serialize session attribute [com.vaadin.flow.server.VaadinSession.springServlet] for session [F0F93879699D54297B7657D9CEC0974D] java.io.NotSerializableException: org.garik.encyclopedia.model.Tag
and after that Tomcat undeploys my application. I can't figure it out. When I was debugging my application as a JAR file it never happened. Can someone please tell me what I can do to avoid it?