无法找到BeanDefinitionParser for Spring Web服务的元素

我是Spring Web服务的新手,我不断收到此错误:

org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Cannot locate BeanDefinitionParser for element [annotation-driven] Offending resource: ServletContext resource [/WEB-INF/spring-ws-servlet.xml] 

经过一番挖掘后,看起来我很可能在我的架构和jar子之间存在版本不匹配但我看不到哪里(我正在为v3.1拍摄)。

这是我库中的每个Spring jar:

 M2_REPO\org\springframework\spring-aop\3.1.1.RELEASE\spring-aop-3.1.1.RELEASE.jar M2_REPO\org\springframework\spring-asm\3.1.1.RELEASE\spring-asm-3.1.1.RELEASE.jar M2_REPO\org\springframework\spring-beans\3.1.1.RELEASE\spring-beans-3.1.1.RELEASE.jar M2_REPO\org\springframework\spring-context\3.1.1.RELEASE\spring-context-3.1.1.RELEASE.jar M2_REPO\org\springframework\spring-context-support\3.1.1.RELEASE\spring-context-support-3.1.1.RELEASE.jar M2_REPO\org\springframework\spring-core\3.1.1.RELEASE\spring-core-3.1.1.RELEASE.jar M2_REPO\org\springframework\spring-expression\3.1.1.RELEASE\spring-expression-3.1.1.RELEASE.jar M2_REPO\org\springframework\spring-jdbc\3.1.1.RELEASE\spring-jdbc-3.1.1.RELEASE.jar M2_REPO\org\springframework\spring-jms\3.1.1.RELEASE\spring-jms-3.1.1.RELEASE.jar M2_REPO\org\springframework\spring-oxm\3.1.1.RELEASE\spring-oxm-3.1.1.RELEASE.jar M2_REPO\org\springframework\ws\spring-oxm\1.5.10\spring-oxm-1.5.10.jar M2_REPO\org\springframework\ws\spring-oxm-tiger\1.5.10\spring-oxm-tiger-1.5.10.jar M2_REPO\org\springframework\security\spring-security-acl\3.1.1.RELEASE\spring-security-acl-3.1.1.RELEASE.jar M2_REPO\org\springframework\security\spring-security-config\3.1.1.RELEASE\spring-security-config-3.1.1.RELEASE.jar M2_REPO\org\springframework\security\spring-security-core\3.1.1.RELEASE\spring-security-core-3.1.1.RELEASE.jar M2_REPO\org\springframework\security\spring-security-remoting\3.1.1.RELEASE\spring-security-remoting-3.1.1.RELEASE.jar M2_REPO\org\springframework\security\spring-security-taglibs\3.1.1.RELEASE\spring-security-taglibs-3.1.1.RELEASE.jar M2_REPO\org\springframework\security\spring-security-web\3.1.1.RELEASE\spring-security-web-3.1.1.RELEASE.jar M2_REPO\org\springframework\spring-test\3.1.1.RELEASE\spring-test-3.1.1.RELEASE.jar M2_REPO\org\springframework\spring-tx\3.1.1.RELEASE\spring-tx-3.1.1.RELEASE.jar M2_REPO\org\springframework\spring-web\3.1.1.RELEASE\spring-web-3.1.1.RELEASE.jar M2_REPO\org\springframework\spring-webmvc\3.1.1.RELEASE\spring-webmvc-3.1.1.RELEASE.jar M2_REPO\org\springframework\ws\spring-ws-core\2.1.2.RELEASE\spring-ws-core-2.1.2.RELEASE.jar M2_REPO\org\springframework\ws\spring-ws-core-tiger\1.5.10\spring-ws-core-tiger-1.5.10.jar M2_REPO\org\springframework\ws\spring-xml\1.5.10\spring-xml-1.5.10.jar 

弹簧-WS-servlet.xml中

         

web.xml中

    My Webservice Created By Archetype for Spring WS   spring-ws org.springframework.ws.transport.http.MessageDispatcherServlet  transformWsdlLocations true    spring-ws /*   

applicationContext.xml我不确定我是否需要这个……

      

每当它读取一个元素时,就会在spring-ws-servlet.xml中抛出该错误。 就像我说的,我是Spring网络服务的新手,并且认识到我的设置可能存在明显的缺陷,并且非常感谢任何帮助。 谢谢!

解决了。 显然我的一个依赖项引入了不同版本的spring-ws,即使它没有列在我引用的库下。 我实际上最终不需要整个依赖,所以我只是删除它,现在我没有得到任何错误。