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

  • xsd validation errors in Eclipse when using spring data

    I am getting errors like:

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

    <xsd:import namespace=""
    schemaLocation="" />

    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.


  • #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.


    • #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.