当前位置: 代码迷 >> Java Web开发 >> spring mvc 加上tx:annotation-driven标签报错解决方案
  详细解决方案

spring mvc 加上tx:annotation-driven标签报错解决方案

热度:825   发布时间:2016-04-17 00:36:53.0
spring mvc 加上tx:annotation-driven标签报错
Java code
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/applicationContext-aop.xml]; nested exception is java.lang.NoSuchMethodError: org.springframework.aop.config.AopNamespaceUtils.registerAutoProxyCreatorIfNecessary(Lorg/springframework/beans/factory/support/BeanDefinitionRegistry;Lorg/springframework/beans/factory/parsing/ComponentRegistrar;Ljava/lang/Object;Ljava/lang/Boolean;)V    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412)    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)    at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)    at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)    at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131)    at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:509)    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:427)    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:294)    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:215)    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:924)    at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:887)    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1147)    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)    at org.apache.catalina.core.StandardService.start(StandardService.java:516)    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)    at org.apache.catalina.startup.Catalina.start(Catalina.java:578)    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)    at java.lang.reflect.Method.invoke(Method.java:597)    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)Caused by: java.lang.NoSuchMethodError: org.springframework.aop.config.AopNamespaceUtils.registerAutoProxyCreatorIfNecessary(Lorg/springframework/beans/factory/support/BeanDefinitionRegistry;Lorg/springframework/beans/factory/parsing/ComponentRegistrar;Ljava/lang/Object;Ljava/lang/Boolean;)V    at org.springframework.transaction.config.TxAnnotationDrivenExecutor$AopAutoProxyConfigurer.configureAutoProxyCreator(TxAnnotationDrivenExecutor.java:102)    at org.springframework.transaction.config.TxAnnotationDrivenExecutor.doExecute(TxAnnotationDrivenExecutor.java:11)    at org.springframework.transaction.config.TxAnnotationDrivenExecutor.doExecute(TxAnnotationDrivenExecutor.java:1)    at org.springframework.context.config.AbstractSpecificationExecutor.execute(AbstractSpecificationExecutor.java:43)    at org.springframework.context.config.AbstractFeatureSpecification.execute(AbstractFeatureSpecification.java:75)    at org.springframework.context.config.AbstractSpecificationBeanDefinitionParser.parse(AbstractSpecificationBeanDefinitionParser.java:44)    at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)    at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1411)    at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1401)    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:188)    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:144)    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:114)    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)    ... 37 more2011-10-13 10:02:52 org.apache.catalina.core.StandardContext listenerStart