Uploaded image for project: 'Spring Data JPA'
  1. Spring Data JPA
  2. DATAJPA-1582

Local schema resolution fails for spring-repository.xsd

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2 RC1 (Moore), 1.11.23 (Ingalls SR23), 2.1.10 (Lovelace SR10)
    • Component/s: None
    • Labels:
      None
    • Environment:
      Spring Data JPA 1.11.22.RELEASE
      Spring Data Commons 1.13.22.RELEASE
      XML configuration

      Description

      In the new spring-jpa-1.11.xsd that was introduced in version 1.11.20.RELEASE there is an xsd import in this file where it imports the spring-repository.xsd

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

      However note that the URL in the schemaLocation property here is http*s* and not http as it was in version 1.8 of the schema.

       

      The associated spring.schemas file in the Spring Data Commons jar is as follows:

      http\://www.springframework.org/schema/data/repository/spring-repository.xsd=org/springframework/data/repository/config/spring-repository-1.11.xsd

      But note that the lookup key here is http (not http*s*) so the lookup fails, and it then attempts to access the URL remotely to get the xsd file, which fails when there is no internet connection.

       

      I have manually worked around the issue by providing my own spring.schemas file with a mapping for the https URL.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mp911de Mark Paluch
              Reporter:
              stuartbirsencr Stuart Birse
              Last updater:
              Rade Martinović
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: