簡體   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