首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

Spring +Hibernate +Struts2 Action中无法得到Bean错误

2013-09-11 
Spring +Hibernate +Struts2Action中无法得到Bean异常org.springframework.beans.factory.BeanCreationExc

Spring +Hibernate +Struts2 Action中无法得到Bean异常
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.interceptor.TransactionInterceptor#0': Cannot resolve reference to bean 'hibernateTransactionManagerID' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateTransactionManagerID' defined in class path resource [spring.xml]: Cannot resolve reference to bean 'sessionFactoryID' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactoryID' defined in class path resource [spring.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V

解决方法:
Spring 和 Hibernate 共用的一些 jar 文件发生了版本冲突, 删除 WEB-INF/lib/asm-2.2.3.jar 然后重启 Tomcat.
asm-2.2.3.jar
       asm.jar
       asm-attrs.jar
      asm-commons-2.2.3.jar
      asm-util-2.2.3.jar



我的异常网推荐解决方案:org.springframework.beans.factory.BeanCreationException:,http://www.myexception.cn/j2ee/10759.html

热点排行