报错为:java.lang.NoSuchMethodError: org.objectweb.asm.ClassReader.accept(Lorg/objectweb/asm/ClassVisitor;I)V
但我在网上找都说是 hibernate 和spring 整合时用aop会存在包冲突,我按网上说的找了下 我没有用hibernate里面的asm相关的jar包,但是还是报错。求高人指点。
我用到的jar包  :<classpathentry kind="lib" path="WebContent/WEB-INF/lib/antlr-2.7.6.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-collections-3.1.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-dbcp.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-fileupload-1.2.2.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-logging-1.1.1.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-pool-1.3.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/dom4j-1.6.1.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/ejb3-persistence.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/freeer-2.3.16.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/hibernate-annotations.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/hibernate-commons-annotations.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/hibernate3.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/javassist-3.4.GA.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jta.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jtds-1.2.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/log4j-1.2.15.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/ognl-3.0.1.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/slf4j-api-1.5.2.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/slf4j-log4j12-1.5.0.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/struts2-convention-plugin-2.2.3.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/struts2-core-2.2.3.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/struts2-spring-plugin-2.2.3.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/xwork-core-2.2.3.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/junit-4.9b2.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/backport-util-concurrent-2.2.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/aspectjweaver.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-io-2.0.1.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-lang-2.5.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/asm-2.2.3.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/asm-commons-2.2.3.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/asm-util-2.2.3.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/cglib-nodep-2.1_3.jar"/>

解决方案 »

  1.   

    ++  其实很多问题你自己google一下就行,像异常这些
      

  2.   

    我都搜了大半天了,asm-commons去掉 就会报:
    java.lang.NoClassDefFoundError: org/objectweb/asm/commons/EmptyVisitor
    这个错
      

  3.   

    <classpathentry kind="lib" path="WebContent/WEB-INF/lib/asm-2.2.3.jar"/>这个了~~~删掉!!!
      

  4.   

    不行的还是报错。。去掉asm-2.2.3.jar 就会报
    java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor我郁闷了
      

  5.   

    asm-common去掉如果出错的话 就保留common把asm-2.2.3.jar去掉如果还出错的话 再试验 再调试 动动手 行么?
      

  6.   

    去掉asm,并且加包的时候最后加spring的,如果有冲突就覆盖,因为spring为了整合struts和hibernate,包中有一些类是实现了struts和hibernate中提供的接口,而且有的类重写过
      

  7.   

    去掉asm-2.2.3.jar ,保留asm,直接用myeclipse里的jar包就可以
      

  8.   

    谢谢各位了。。我把myeclipse里面自动生成的jar包拷到eclipse里面 还是不能报找不到方法但是在myeclipse里面 就可以正常启动。最后解决办法是  把asm开头的jar包全部删掉,下载了一个asm-all-3.0.jar 包 正常启动。