用.hbm.xml的Mapping配置方式 根据抛出的异常:Association references unmapped class: com.hcrm.bean.ComplaintInfo,说明你的配置中有一个关联映射,
应该在某个类中,有个声明为ComplainInfo属性,它对com.hcrm.bean.ComplaintInfo有依赖,而你又没有将这个com.hcrm.bean.ComplaintInfo加入到Hibernate的映射配置中,
建议你检查下hibernate.cfg.xml文件,将<mapping class="com.hcrm.bean.ComplaintInfo" />加入sessionFactory的配置内。
总之错误原因在hbm.xml映射文件与对应的bean文件中
相关文章
- Nacos报错:Error creating bean with name ‘authFilterRegistration‘ defined in class path resource
- springboot启动报:Error creating bean with name 'dataSource' defined in class path resource
- SSH整合启动报错 严重: Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [config/bean-base.xml
- Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xm
- Error creating bean with name 'sessionFactory' defined in class path resource
- Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]
- Error creating bean with name 'sessionFactory' defined in ServletContext resource
- Error creating bean with name 'shiroFilter' defined in class path resource [com/
- BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [
- 头痛呀Error creating bean with name 'sessionFactory' defined in ServletContext resource