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

Spring Data- JPA Schema validation error in STS

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.2
    • Fix Version/s: 1.0.3, 1.1 RC1
    • Component/s: Namespace
    • Labels:
      None
    • Environment:
      STS Version: 2.8.1.RELEASE Build Id: 201111221000
      Spring-Data-JPA 1.0.2-RELEASE

      Description

      I have included a forum link here http://forum.springsource.org/showthread.php?118643-xsd-validation-errors-in-Eclipse-when-using-spring-data by someone else apparently having the same issue as I am. My configuration is even simpler than the one described in the forum thread I have posted it in its entirety below:

      <?xml version="1.0" encoding="UTF-8"?>
      <beans:beans xmlns= "http://www.springframework.org/schema/data/jpa" 
      	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      	xmlns:beans="http://www.springframework.org/schema/beans"
      	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
      		http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.0.xsd">
      		
      	<repositories base-package="com.xxxx.xxxx.store.repository" entity-manager-factory-ref="localContainerEntityManagerFactoryBean">
      	</repositories>
      </beans:beans>
      

      Basically STS is showing the annoying red X saying that 'A schema cannot contain two global components with the same name; this schema contains two occurrences of 'http://www.springframework.org/schema/

      {context, beans tool}

      ,xxx' Where xxx can be replaced by one of the many components within the namespace.

      I am using Java Config and importing that XML with @ImportResource from my java configuration file. Since I noticed a post was just made on how to configure spring data JPA with java configuration I will try that as a work around. I have classified this as a minor bug as things seem to still work normally but I am trying to introduce Spring data into one of my enterprise projects and a big red X does not instill a lot of faith

      Thanks,

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                olivergierke Oliver Gierke
                Reporter:
                wgorder William Gorder
                Last updater:
                Trevor Marshall
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: