Announcement Announcement Module
Collapse
No announcement yet.
xsd validation errors in Eclipse when using spring data Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • xsd validation errors in Eclipse when using spring data

    I am getting errors like:

    Code:
    sch-props-correct.2: A schema cannot contain two global components with the same name; this schema contains two occurrences of 'http://www.springframework.org/schema/context/context,propertyPlaceholder'.
    I'm using spring data 1.0 (or 1.1 I think). The error appears to sprout from the inclusion of:

    [CODE]
    <xsd:import namespace="http://www.springframework.org/schema/context"
    schemaLocation="http://www.springframework.org/schema/context/spring-context-3.0.xsd" />
    [CODE]

    in spring-jpa-1.0.xsd in the jar file.

    Is this correct? Is there a way to turn-off the error signal. I'm not sure if this could cause problems in the future if the xsd import is tightly coupled to the spring context xsd.

    Thoughts?

  • #2
    Sorry, that was a bit vague:

    The XML definitions are declared in a toplevel XML context file--just standard bean definitions. I fixed the problem by removing the xmlns:context="http://.../schema/context" from this toplevel XML context file.


    The toplevel context file also contains the spring data jpa namespace import which eventually includes the xsd:import shown above.

    I think that tying spring jpa so tightly to the 3.0 seems like high coupling and I am guessing that can be changed to just spring-context.xsd in order to bring in the latest xsd that is being provided by the programmer. Its can be up to the programmer to ensure they are using at least spring 3.0. Or maybe there is another way to do it without the xsd:import in the spring data XSD file.

    There is a work around to this but I'm not sure it should be left like this and you can longer use context schema cleanly in any file that uses the spring data namespace.

    Comment


    • #3
      FYI for the original poster and others that may find this thread.
      Oliver seems to have this slated to be fixed in 1.0.3.

      https://jira.springsource.org/browse...s:all-tabpanel

      Comment

      Working...
      X