Spring和Hibernate包冲突的问题

Caused by: 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.springframework.aop.framework.Cglib2AopProxy.createEnhancer(Cglib2AopProxy.java:228)
 at org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:170)
 at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:112)
 at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.createProxy(AbstractAutoProxyCreator.java:476)
 at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:362)
 at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:322)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:404)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
 ... 11 more

 

可能的问题:Hibernate3.3包cglib.jar与Spring3.0包com.springsource.net.sf.cglib-2.2.0.jar冲突

解决方案:将Hibernate3.3 Core Libraries从路径中删除,重新添加。

分析:可能是重名的包存在访问冲突,在访问顺序有所出路。

你可能感兴趣的:(Spring和Hibernate包冲突的问题)