title: java.io.NotSerializableException is thrown while restarting Vaadin application
body: <p>When I restart my Tomcat, I get the following error:</p>
  
  <pre><code>2014;10;01; 15;49;47;055; WARN; com.vaadin.event.ListenerMethod;[localhost-startStop-2]; Error in serialization of the application: Class com.aaa.bbb.MyServlet$1 must implement serialization.
  2014;10;01; 15;49;47;055; WARN; org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/my-vaadin];[localhost-startStop-2]; Cannot serialize session attribute com.vaadin.server.VaadinSession.MyServlet for session ...
  java.io.NotSerializableException: org.apache.catalina.loader.WebappClassLoader
      at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[na:1.6.0_31]
      at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) ~[na:1.6.0_31]
      at java.io.ObjectOutputStream.writeSerialData(Unknown Source) ~[na:1.6.0_31]
      at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) ~[na:1.6.0_31]
      at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[na:1.6.0_31]
      at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) ~[na:1.6.0_31]
      at java.io.ObjectOutputStream.writeSerialData(Unknown Source) ~[na:1.6.0_31]
      at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) ~[na:1.6.0_31]
      at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[na:1.6.0_31]
      at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) ~[na:1.6.0_31]
      at java.io.ObjectOutputStream.writeSerialData(Unknown Source) ~[na:1.6.0_31]
      at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) ~[na:1.6.0_31]
      at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[na:1.6.0_31]
      at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) ~[na:1.6.0_31]
      at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source) ~[na:1.6.0_31]
      at com.vaadin.event.ListenerMethod.writeObject(ListenerMethod.java:88) ~[vaadin-server-7.2.7.jar:7.2.7]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_31]
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.6.0_31]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.6.0_31]
      at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.6.0_31]
      ...
  </code></pre>