Skip to content

Failed to read schema document ".../spring-repository.xsd" #32

@sebdavid

Description

@sebdavid

Hi !

I'm using v2.0.4.RELEASE of spring-ldap-core, referencing it as written in the doc :

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

I'm using it with other Spring librairies (jdbc, context, tx, and web) in version 4.2.1.RELEASE, but NOT with Spring security.

When the Spring context is loadded, the following error is thrown :

org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/data/repository/spring-repository.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not xsd:schema.

The begin of my XML Spring context is :

<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:ldap="http://www.springframework.org/schema/ldap"
    xsi:schemaLocation="
            http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
            http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
            http://www.springframework.org/schema/ldap http://www.springframework.org/schema/ldap/spring-ldap.xsd">

Indeed, the spring-ldap-2.0.xsd contains the following which can not be found :

    <xs:import namespace="http://www.springframework.org/schema/data/repository"
                schemaLocation="http://www.springframework.org/schema/data/repository/spring-repository.xsd" />

After some search it seems that the missing xsd is in spring-data-commons, specified as "optional" in the spring-ldap-core pom.xml. So should I really add spring-data-commons as a dependency in my project ?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions