2017-02-15 74 views
0

重度:上下文初始化失敗 org.springframework.beans.factory.BeanDefinitionStoreException: 意外excep重刑解析XML從ServletContext的 資源文件[/WEB-INF/config/spring-config.xml]意外excep重刑解析XML從ServletContext的資源文件[/WEB-INF/config/spring-config.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.0.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.0.xsd"> 
    <context:component-scan base-package="com.blog.samples.services" /> 
    <sws:annotation-driven /> 
    <!-- Our test service bean --> 
    <bean id="AccountDetailsService" 
     class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition" 
     lazy-init="true"> 
     <property name="schemaCollection"> 
      <bean 
       class="org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection"> 
       <property name="inline" value="true" /> 
       <property name="xsds"> 
        <list> 
         <value>schemas/AccountDetailsServiceOperations.xsd</value> 
        </list> 
       </property> 
      </bean> 
     </property> 
     <property name="portTypeName" value="AccountDetailsService" /> 
     <property name="serviceName" value="AccountDetailsServices" /> 
     <property name="locationUri" value="/endpoints" /> 
    </bean> 

</beans> 

回答

0

請確保您有這些依賴於你的classpath(改爲正確的版本):

<dependency> 
    <groupId>org.springframework</groupId> 
    <artifactId>spring-core</artifactId> 
    <version>version</version> 
</dependency> 


<dependency> 
    <groupId>org.springframework</groupId> 
    <artifactId>spring-context</artifactId> 
    <version>version</version> 
</dependency> 

<dependency> 
    <groupId>org.springframework.ws</groupId> 
    <artifactId>spring-ws</artifactId> 
    <version>version</version> 
</dependency>