日期:2014-05-20  浏览次数:20800 次

关于SPRING STRUTS HIBER整合问题出错!
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'service': FactoryBean threw exception on object creation; nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
org.springframework.beans.factory.support.AbstractBeanFactory.getObjectFromFactoryBean(AbstractBeanFactory.java:1252)
org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1217)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:206)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:737)
org.springframework.web.struts.DelegatingRequestProcessor.getDelegateAction(DelegatingRequestProcessor.java:176)
org.springframework.web.struts.DelegatingRequestProcessor.processActionCreate(DelegatingRequestProcessor.java:154)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:221)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause 

java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
net.sf.cglib.core.ClassEmitter.begin_class(ClassEmitter.java:77)
net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:173)
net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117)
net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69)
org.springframework.aop.framework.Cglib2AopProxy.createEnhancer(Cglib2AopProxy.java:223)
org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:150)
org.springframework.aop.framework.ProxyFactoryBean.getProxy(ProxyFactoryBean.java:347)
org.springframework.aop.framework.ProxyFactoryBean.getSingletonInstance(ProxyFactoryBean.java:302)
org.springframework.aop.framework.ProxyFactoryBean.getObject(ProxyFactoryBean.java:228)
org.springframework.beans.factory.support.AbstractBeanFactory.getObjectFromFactoryBean(AbstractBeanFactory.java:1246)
org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1217)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:206)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:737)
org.springframework.web.struts.DelegatingRequestProcessor.getDelegateAction(DelegatingRequestProcessor.java:176)
org.springframework.web.struts.DelegatingRequestProcessor.processActionCreate(DelegatingRequestProcessor.java:154)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:221)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

我spring用的是2.0 hibernate用的是3.2 这个错误我真的搞不懂了,高手看下!