Announcement Announcement Module
No announcement yet.
Default version of spring context xml schema Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Default version of spring context xml schema


    I usually specify schema location in my configuration files like this:

    But when I switched to integration 2.2.0 (from 2.1.3) and used some new features, my IDE found errors int the xml file.
    I thought that spring-integration.xsd refers to the latest schema, but it differs from versions 2.0, 2.1 and 2.2. Specifying spring-integration-2.2.xsd solves the validation problems, but makes migration to a newer version more complicated.

    For example refers to the same schema as

    What is the best practice to configure namespaces for integration?

    -- Alexey

  • #2

    Take a look here:

    Take care,


    • #3
      I've already tried it. The URL refers to a 1.0 schema version.
      It's interesting that referes to 2.0 (at least it imports core schema 2.0).

      I think URLs without versions should refer schemes of the same version (probably the latest and the greatest)


      • #4
        Yes; for historical reasons, the version-less schema on the internet is 1.0 - this is to avoid applications that use versions earlier than 1.0.3 from having problems. We were talking about this last week and maybe now it's time to risk breaking those applications for the benefit of avoiding these kinds of issues.

        However, I am surprised that clearing the cache and rebuilding did not resolve your issues; it always does for me (and most others).

        Apparently, some more work has been done in STS in this area and will be released soon.


        • #5
          I'm using STS based on eclipse 3.8, but not 4.*.
          After clearing the cache I can ctrl+click to that URL in my context file and 1.0 schema is opened. I do not understand why STS should validate my context with the newer schema.


          • #6
            I am using the same thing (3.1.0 w/ eclipse 3.8).

            Of course, control-click will open the URL on the internet - but STS doesn't use that for Spring projects (with Spring Project Nature enabled), it uses metadata in the Spring Jars (META-INF/schemas) to map URLs to the physical file in the jar; for example


            Don't ctrl-click - that might simply put the wrong schema in the cache.

            You can also try disabling the cache altogether.