首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2SE开发 >

求解啊解决办法

2013-09-11 
求解啊。org.springframework.beans.factory.BeanCreationException: Error creating bean with name hibe

求解啊。
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateTemplate' defined in file [D:\file\myeclipsese\RPIntoSavePinSystem\bin\spring\applicationContext-common.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 file [D:\file\myeclipsese\RPIntoSavePinSystem\bin\spring\applicationContext-common.xml]: Invocation of init method failed; nested exception is org.hibernate.AnnotationException: mappedBy reference an unknown target entity property: com.ruipengkj.bean.TWorkShift.TEmployee in com.ruipengkj.bean.TEmployee.TWorkShifts
[解决办法]
nested exception is org.hibernate.AnnotationException: mappedBy reference an unknown target entity property: com.ruipengkj.bean.TWorkShift.TEmployee in com.ruipengkj.bean.TEmployee.TWorkShifts

com.ruipengkj.bean.TWorkShift.TEmployee 这个没有注册spring的bean吧,在这个类上加个@Component

[解决办法]
问题原因是很多的,不一定出在哪。
可能是少包,可能是你的配置文件,哪个字母写错了,配置属性写错了。
仔细检查下吧,如果是根据哪个学习材料敲的代码,好好对比下哪不一样。就是小问题。

热点排行