同一个应用在jboss下发布2份,启动第二个web的时候提示DuplicateMappingException?
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in file [D:\jboss-4.2.3.GA\server
......
Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [D:
......
Caused by: org.hibernate.DuplicateMappingException: Duplicate class/entity mapping com.prj.model.BasicInfo
at org.hibernate.cfg.Mappings.addClass(Mappings.java:118)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:145)
at org.hibernate.cfg.Configuration.add(Configuration.java:669)
at org.hibernate.cfg.Configuration.addFile(Configuration.java:309)
[解决办法]
可能是项目lib目录下asm的jar包冲突,你可以到lib目录下查看一下是否有不同版本的asm的jar.如果有,在项目中删除多余的就可以了
我的异常网推荐解决方案:org.springframework.beans.factory.BeanCreationException:,http://www.myexception.cn/j2ee/10759.html