`
星夜的遐想
  • 浏览: 190555 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

java.lang.NoClassDefFoundError: org/objectweb/asm/CodeVisitor

 
阅读更多

在SSH集成中,Spring和hibernate会同时引入asm.jar包,因此出现版本冲突,异常信息如下:

 

aused by: java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
 at net.sf.cglib.core.ClassEmitter.begin_class(ClassEmitter.java:77)
 at net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:173)
 at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
 at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
 at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
 at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117)
 at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
 at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
 at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69)
 at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:117)
 at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
 at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
 at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntit

 

我们只需将asm-2.2.3.jar移除,保留asm.jar即可!

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics