为了账号安全,请及时绑定邮箱和手机立即绑定

是架包冲突吗

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister


正在回答

2 回答

因为spring在3.1之后的版本中把 AnnotationSessionFactoryBean与LocalSessionFactoryBean集成到了一起,统一用org\springframework\orm\hibernate4\LocalSessionFactoryBean。 不再有AnnotationSessionFactoryBean类; 但是org.springframework.orm-3.1.1.RELEASE.jar 依然保留有org\springframework\orm\hibernate3这个包,这是为了向下兼容。所以改成hibernate4即可!

0 回复 有任何疑惑可以回复我~

我也报了这个错误,也在网上查过,感觉有八成是各个bean里的书写错误。仔细排查可能会找到

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

是架包冲突吗

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号