Announcement Announcement Module
Collapse
No announcement yet.
spring-beans-3.2.xsd Where is it ? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring-beans-3.2.xsd Where is it ?

    I've seen a lot of examples which use

    http://www.springframework.org/schem...-beans-3.2.xsd

    as their namespace for beans. I can't access this location though so my question is : how to update to use the new directives ?

    Mike

  • #2
    I doubt that as Spring 3.2 isn't final yet so t here isn't an xsd for it (yet)...

    Also when you have the correct spring jars spring will load the xsd from jar files so if you use Spring 3.2 RC1 it will be loaded for you (still might be that IDE's give you some trouble).

    Comment


    • #3
      Originally posted by Marten Deinum View Post
      I doubt that as Spring 3.2 isn't final yet so t here isn't an xsd for it (yet)...

      Also when you have the correct spring jars spring will load the xsd from jar files so if you use Spring 3.2 RC1 it will be loaded for you (still might be that IDE's give you some trouble).
      Ok, to clarify. You suggest that, provided I have the spring jars on the cp (I do), that I can use new 3.2 directives with the 3.1 schema set in the namespace ?

      Cheers,
      Mike.

      Comment


      • #4
        You suggest that, provided I have the spring jars on the cp (I do), that I can use new 3.2 directives with the 3.1 schema set in the namespace ?
        No... You can simply use the 3.2 xsd... (It is adviced to use the versionless xsd btw which should always point to the most recent version which is on your classpath).

        Comment


        • #5
          Originally posted by Marten Deinum View Post
          No... You can simply use the 3.2 xsd... (It is adviced to use the versionless xsd btw which should always point to the most recent version which is on your classpath).
          Ah ok.

          So you suggest

          Code:
          <beans xmlns="http://www.springframework.org/schema/beans"
          	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          	xsi:schemaLocation="http://www.springframework.org/schema/beans
                  http://www.springframework.org/schema/beans/spring-beans-3.2.xsd">
          Should work, but

          Code:
          <beans xmlns="http://www.springframework.org/schema/beans"
          	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          	xsi:schemaLocation="http://www.springframework.org/schema/beans
                  http://www.springframework.org/schema/beans/spring-beans.xsd">
          Is preferred. Is there some configuration needed to make this work correctly in STS ? Starting with the first option will cause runtime errors

          Code:
          Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.
          Sorry I dont mean to turn this into a debug session, so if you can point me to the relevant documentation in code that would also be fine.

          Cheers,
          Mike.

          Comment


          • #6
            It depends on your STS version... The newest version should detect the xsd files in the jar files (if the correct tooling files are in the spring jar files that is). IN older versions you would need to add them to the catalog yourselves.

            If you get runtime errors there is something wrong with your deployment/build. Check the jars that get packaged with your application make sure that you don't mix spring versions. Also be aware that 3.2 isn't final it is still in development!

            Comment

            Working...
            X