久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

無法為 Spring Web 服務(wù)的元素找到 BeanDefinitionPars

Cannot locate BeanDefinitionParser for element for Spring web services(無法為 Spring Web 服務(wù)的元素找到 BeanDefinitionParser)
本文介紹了無法為 Spring Web 服務(wù)的元素找到 BeanDefinitionParser的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我是 Spring Web 服務(wù)的新手,我不斷收到此錯(cuò)誤:

I am brand new to Spring web services and I keep getting this error:

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]

經(jīng)過一番挖掘,看起來我的架構(gòu)和 jar 之間的版本很可能不匹配,但我看不出在哪里(我正在為 v3.1 拍攝).

After some digging around, it looks like I most likely have a version mismatch between my schemas and jars but I do not see where (I'm shooting for v3.1).

這是我?guī)熘械拿總€(gè) Spring jar:

Here is every Spring jar in my library:

M2_REPOorgspringframeworkspring-aop3.1.1.RELEASEspring-aop-3.1.1.RELEASE.jar
M2_REPOorgspringframeworkspring-asm3.1.1.RELEASEspring-asm-3.1.1.RELEASE.jar
M2_REPOorgspringframeworkspring-beans3.1.1.RELEASEspring-beans-3.1.1.RELEASE.jar
M2_REPOorgspringframeworkspring-context3.1.1.RELEASEspring-context-3.1.1.RELEASE.jar
M2_REPOorgspringframeworkspring-context-support3.1.1.RELEASEspring-context-support-3.1.1.RELEASE.jar
M2_REPOorgspringframeworkspring-core3.1.1.RELEASEspring-core-3.1.1.RELEASE.jar
M2_REPOorgspringframeworkspring-expression3.1.1.RELEASEspring-expression-3.1.1.RELEASE.jar
M2_REPOorgspringframeworkspring-jdbc3.1.1.RELEASEspring-jdbc-3.1.1.RELEASE.jar
M2_REPOorgspringframeworkspring-jms3.1.1.RELEASEspring-jms-3.1.1.RELEASE.jar
M2_REPOorgspringframeworkspring-oxm3.1.1.RELEASEspring-oxm-3.1.1.RELEASE.jar
M2_REPOorgspringframeworkwsspring-oxm1.5.10spring-oxm-1.5.10.jar
M2_REPOorgspringframeworkwsspring-oxm-tiger1.5.10spring-oxm-tiger-1.5.10.jar
M2_REPOorgspringframeworksecurityspring-security-acl3.1.1.RELEASEspring-security-acl-3.1.1.RELEASE.jar
M2_REPOorgspringframeworksecurityspring-security-config3.1.1.RELEASEspring-security-config-3.1.1.RELEASE.jar
M2_REPOorgspringframeworksecurityspring-security-core3.1.1.RELEASEspring-security-core-3.1.1.RELEASE.jar
M2_REPOorgspringframeworksecurityspring-security-remoting3.1.1.RELEASEspring-security-remoting-3.1.1.RELEASE.jar
M2_REPOorgspringframeworksecurityspring-security-taglibs3.1.1.RELEASEspring-security-taglibs-3.1.1.RELEASE.jar
M2_REPOorgspringframeworksecurityspring-security-web3.1.1.RELEASEspring-security-web-3.1.1.RELEASE.jar
M2_REPOorgspringframeworkspring-test3.1.1.RELEASEspring-test-3.1.1.RELEASE.jar
M2_REPOorgspringframeworkspring-tx3.1.1.RELEASEspring-tx-3.1.1.RELEASE.jar
M2_REPOorgspringframeworkspring-web3.1.1.RELEASEspring-web-3.1.1.RELEASE.jar
M2_REPOorgspringframeworkspring-webmvc3.1.1.RELEASEspring-webmvc-3.1.1.RELEASE.jar
M2_REPOorgspringframeworkwsspring-ws-core2.1.2.RELEASEspring-ws-core-2.1.2.RELEASE.jar
M2_REPOorgspringframeworkwsspring-ws-core-tiger1.5.10spring-ws-core-tiger-1.5.10.jar
M2_REPOorgspringframeworkwsspring-xml1.5.10spring-xml-1.5.10.jar

spring-ws-servlet.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:context="http://www.springframework.org/schema/context"
  xmlns:sws="http://www.springframework.org/schema/web-services"
  xsi:schemaLocation="
      http://www.springframework.org/schema/beans
      http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
      http://www.springframework.org/schema/web-services
      http://www.springframework.org/schema/web-services/web-services-2.0.xsd
      http://www.springframework.org/schema/context
      http://www.springframework.org/schema/context/spring-context-3.1.xsd">

    <context:component-scan base-package="my.package"/>

    <sws:annotation-driven />

    <sws:dynamic-wsdl id="MyService"
        portTypeName="MyServiceInterface"
        locationUri="/myService/">
        <sws:xsd location="/WEB-INF/mySchema.xsd" />
    </sws:dynamic-wsdl>

</beans>

web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
         xmlns="http://java.sun.com/xml/ns/javaee" 
         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" 
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
                             http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" 
         version="3.0">

    <display-name>
        My Webservice Created By Archetype for Spring WS
    </display-name>

    <servlet>
        <servlet-name>spring-ws</servlet-name>
        <servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class>          
        <init-param>
            <param-name>transformWsdlLocations</param-name>
            <param-value>true</param-value>
        </init-param>
    </servlet>

    <servlet-mapping>
        <servlet-name>spring-ws</servlet-name>
        <url-pattern>/*</url-pattern>
    </servlet-mapping>

</web-app>

applicationContext.xml我什至不確定我是否需要這個(gè)......

applicationContext.xml I'm not sure that I even need this...

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
              http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
              http://www.springframework.org/schema/context
              http://www.springframework.org/schema/context/spring-context-3.1.xsd">

    <context:component-scan base-package="my.package" />

    <context:annotation-config />

</beans>

當(dāng) spring-ws-servlet.xml 讀取一個(gè)元素時(shí),就會(huì)拋出錯(cuò)誤.就像我說的,我是 Spring Web 服務(wù)的新手,我意識(shí)到我的設(shè)置中可能存在明顯的缺陷,非常感謝任何幫助.謝謝!

The error is being thrown in spring-ws-servlet.xml whenever it reads a element. Like I said, I'm brand new to Spring web services and recognize that there is probably an obvious flaw in my setup and would greatly appreciate any help. Thanks!

推薦答案

解決了.顯然,我的一個(gè)依賴項(xiàng)是引入了不同版本的 spring-ws,即使它沒有列在我引用的庫下.實(shí)際上我最終不需要整個(gè)依賴項(xiàng),所以我只是刪除了它,現(xiàn)在我沒有收到任何錯(cuò)誤.

Solved. Apparently one of my dependencies was bringing in a different version of spring-ws even though it wasn't listed under my referenced libraries. I actually ended up not needing the whole dependency so I simply removed it and now I'm not getting any errors.

這篇關(guān)于無法為 Spring Web 服務(wù)的元素找到 BeanDefinitionParser的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

How to wrap text around components in a JTextPane?(如何在 JTextPane 中的組件周圍環(huán)繞文本?)
MyBatis, how to get the auto generated key of an insert? [MySql](MyBatis,如何獲取插入的自動(dòng)生成密鑰?[MySql])
Inserting to Oracle Nested Table in Java(在 Java 中插入 Oracle 嵌套表)
Java: How to insert CLOB into oracle database(Java:如何將 CLOB 插入 oracle 數(shù)據(jù)庫)
Why does Spring-data-jdbc not save my Car object?(為什么 Spring-data-jdbc 不保存我的 Car 對(duì)象?)
Use threading to process file chunk by chunk(使用線程逐塊處理文件)
主站蜘蛛池模板: 日韩毛片在线观看 | 黑人精品xxx一区一二区 | 一级无毛片 | 欧美成人激情 | 中文字幕免费中文 | 天堂网av在线| 欧美精品在线一区 | 国产日韩视频在线 | 在线日韩 | 一区二区三区在线免费观看 | 中文字幕在线观看一区二区 | 久久国产日本 | 国产精品永久在线观看 | 精品免费国产 | 一区网站| 国产精品精品久久久久久 | 日韩电影中文字幕在线观看 | 老司机深夜福利网站 | 亚洲成人网在线播放 | 美日韩免费视频 | 在线播放国产一区二区三区 | www国产亚洲精品 | 在线视频第一页 | 欧美黑人又粗大 | 欧美一区二区三区在线 | 亚洲成人精品一区 | 色网站入口 | 亚洲一区不卡在线 | 国产精品a一区二区三区网址 | 亚洲成人在线网 | 免费午夜电影 | 精品国产精品一区二区夜夜嗨 | 久久一区二区三区四区五区 | 日韩欧美三级在线 | 91精品国产91久久综合桃花 | 中文字幕在线人 | 欧美成人第一页 | 91精品国产综合久久久久久首页 | 一区二区中文字幕 | 日韩欧美国产精品综合嫩v 一区中文字幕 | 在线视频日韩 |