繁体   English   中英

错误org.springframework.web.context.ContextLoader-上下文初始化失败

[英]ERROR org.springframework.web.context.ContextLoader - Context initialization failed

我是新手,请帮助我确切的问题所在。

ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/dataAccessContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: could not init listeners
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)

它发生了相同的错误,然后我意识到,当我更改数据库的结构并手动更新JPA批注时,它就发生了,这是一个让我逃脱的细节,要解决的问题是自动再次创建实体的所有映射(此操作我用NetBeans向导做了),问题解决了。

本文还详细介绍了Spring 3.1和Hibernate 4.1的集成

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM