Caused by: java.lang.NoClassDefFoundError: org/objectweb/asm/Type

java.lang.NoClassDefFoundError: org/objectweb/asm/Type
  at net.sf.cglib.core.TypeUtils.parseType(TypeUtils.java:180)
        at net.sf.cglib.core.KeyFactory.<clinit>(KeyFactory.java:66)
        at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69)
        at org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:116)
        at org.hibernate.proxy.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:41)
        at org.hibernate.tuple.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:161)
        at org.hibernate.tuple.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:131)
        at org.hibernate.tuple.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
        at org.hibernate.tuple.TuplizerLookup.create(TuplizerLookup.java:64)
        at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:257)
        at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:412)
SSH整合时
我遇到的错误是因为
用的Hibernate的cglib.jar   用的spring的asm.jar  出现的这个错误!
解决方法:
把Hibernate 的cglib.jar 换成spring的
cglib.jar(com.springsource.net.sf.cglib-2.2.0.jar)

如果单是hibernate
hibernate报错:java.lang.NoClassDefFoundError: org/objectweb/asm/Type
是缺少asm.jar(com.springsource.org.objectweb.asm-3.1.0.jar)包

你可能感兴趣的:(Caused by: java.lang.NoClassDefFoundError: org/objectweb/asm/Type)