当前位置: 代码迷 >> Java Web开发 >> org.springframework.beans.factory.BeanCreationException: Error creating bean wit,该怎么解决
  详细解决方案

org.springframework.beans.factory.BeanCreationException: Error creating bean wit,该怎么解决

热度:245   发布时间:2016-04-17 10:30:38.0
org.springframework.beans.factory.BeanCreationException: Error creating bean wit
开发是遇到了这个错误,网上说jar包冲突,其实没有。说路径不对也没有。找大侠解决。谢谢。

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionInterceptor' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: An association from the table bulletin refers to an unmapped class: com.topwalk.oa.personnel.bulletin.bo.Department

------解决方案--------------------
hibernate.MappingException: An association from the table bulletin refers to an unmapped class: com.topwalk.oa.personnel.bulletin.bo.Department

Department的映射文件有问题,仔细比较一下这个bean和映射文件和数据库中的这个表。
------解决方案--------------------
com.topwalk.oa.personnel.bulletin.bo.Department



记得写上默认的构造函数 public Department(){}
  相关解决方案