我正在使用hibernate 4.3.6在我的金库项目。每次我更改源代码时,都希望应用程序再次构建,新的源代码将自动部署到Tomcat。换句话说,Tomcat应该重新加载它的上下文。
问题是,在此操作期间,hibernate抛出一个错误:
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
(...)在那张日志之后,我得到:
24/09/2014 13:14:43 org.apache.catalina.core.StandardContext reload
INFO: Reloading Context with name [/myproject] is completed但是,我不能继续使用该网站,因为我收到一条消息说会话丢失。
我的问题是:这个hibernate异常是什么,我如何解决它?
编辑:此错误仅在我将JPA实体存储在会话中时发生,例如:日志记录的用户
发布于 2014-09-24 17:33:40
我不知道怎样才能得到你想要的东西,在Tomcat,除了JRebel。Vaadin的工作人员使用和推荐。链接到有关Vaadin+JRebel:http://zeroturnaround.com/blog/jrebel-case-study-vaadin-eliminates-redeploys-and-saves-10-of-development-time/的有趣信息
如果将来您决定使用Jetty而不是Tomcat,您可以按照以下建议对应用程序进行设置和动态重新加载:https://blog.oio.de/2012/08/23/dynamic-reloading-of-vaadin-applications-with-maven-and-eclipse /
https://stackoverflow.com/questions/26021985
复制相似问题