您的位置:首页 > 移动开发

Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xm

2012-08-14 15:56 579 查看
Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.DuplicateMappingException: Duplicate class/entity mapping
Guestbook

利用myeclipse自动添加的struts,spring和hibernate框架,有的jar包重复,所以造成了冲突

,两个不同版本的asm的jar包混在一起导致这种错误。

把重复的删掉就可以了。

1.去掉类路径上的关于Hibernate的3个lib

asm.jar

asm-attrs.jar

cglib-2.1.3.jar

2.加入Spring中的以下4个lib

asm-2.2.2.jar

asm-commons-2.2.2.jar

asm-util-2.2.2.jar

cglib-nodep-2.1_3.jar
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐