Eclipse hot deployment in Tomcat error with JPA/Hibernate

HI,

I´m using hibernate 4.3.6 in my vaadin 7.3.1 project.

Every time I make changes in the sources code, it is expected that the application builds again and the new source code is deployed automatically to Tomcat. In other words, Tomcat should reload its context. As indicated by “book of vaadin”, the server serializes the state of the application stored in session.

The problem is that during this operation hibernate throws an error:

[code]
GRAVE: Exception loading sessions from persistent storage org.hibernate.HibernateException:
registry does not contain entity manager factory:
myproject at org.hibernate.jpa.internal.EntityManagerFactoryRegistry.getNamedEntityManagerFactory

(…)
[/code]After that log, i get:

24/09/2014 13:14:43 org.apache.catalina.core.StandardContext reload INFO: Reloading Context with name [/myproject] is completed However, I cannot continue using the website, since I receive a message saying that session is lost.

This error only happens when I store in session a JPA Entity, for example: the logged user

My question is: what is this hibernate exception and how can I solve it?

What are the requirements an application need to support hot deployment?