SEVERE: Context initialization failed org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected excep tion parsing XML document from ServletContext resource [/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>

1 Answers

0
Maciej Kowalski On

Make sure you have those dependencies in your classpath (change to proper versions):

<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>