Spring Tool Suite
  1. Spring Tool Suite
  2. STS-1803

Spring Framework XSD entries no longer in XML catalog

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.1.RELEASE
    • Fix Version/s: 2.7.0.RELEASE
    • Component/s: None
    • Labels:
    • Environment:

      Windows XP

      Description

      In previous versions (e.g. 2.5.0 and 2.5.2) the XML catalog plugin entries contained xsd entries for all of the various spring framework jars. 2.6.1.SR1 does not contain these entries. Is there a reason for this? I suppose this is not a problem for people developing on a computer or LAN that is connected to the internet, but for those of us who are disconnected from the internet while developing, this is an issue. My workaround is to add an entry when I need it, but I'd rather have the plugin entries. Can anyone advise me why this has changed in the latest release, or if there is a way to get the plugin entries into the catalog?

        Activity

        Hide
        Martin Lippert (c) added a comment -

        Hey Steve!

        This was indeed changed by intention, since the XSDs are read by default from the classpath of your individual project. Therefore you should be able to work with this without an internet connection as well. Do you have problems reading/using the XSDs from the classpath of your project?

        -Martin

        Show
        Martin Lippert (c) added a comment - Hey Steve! This was indeed changed by intention, since the XSDs are read by default from the classpath of your individual project. Therefore you should be able to work with this without an internet connection as well. Do you have problems reading/using the XSDs from the classpath of your project? -Martin
        Hide
        Steve Storck added a comment - - edited

        Yes, a problem still exists in resolving XSDs on the classpath.

        In STS 2.6.1, Window / Preferences / Spring / Beans Support / Namespaces, I have "Use highest XSD..." and "Load NamespaceHandlers and XSDs from project's classpath" selected/checked.

        To reproduce this problem, create a new Maven project. Your only dependency should be org.springframework.beans, version 3.0.5.RELEASE. Then create a file called test.xsd where the contents are:

        <?xml version="1.0" encoding="UTF-8"?>
        <xsd:schema xmlns="http://java.sun.com/xml/ns/persistence/orm"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:beans="http://www.springframework.org/schema/beans">

        <xsd:import namespace="http://www.springframework.org/schema/beans" />

        <xsd:element name="test">
        <xsd:simpleType>
        <xsd:list itemType="beans:identifiedType">
        </xsd:list>
        </xsd:simpleType>
        </xsd:element>

        </xsd:schema>

        • You might also have to disconnect your machine from the internet to reproduce the error.

        When you validate this schema, it will notify you that it "Cannot resolve the name 'beans:identifiedType' to a 'type definition' component."

        Note that this validation error is removed when an xml catalog entry points to the beans xsd file.

        Show
        Steve Storck added a comment - - edited Yes, a problem still exists in resolving XSDs on the classpath. In STS 2.6.1, Window / Preferences / Spring / Beans Support / Namespaces, I have "Use highest XSD..." and "Load NamespaceHandlers and XSDs from project's classpath" selected/checked. To reproduce this problem, create a new Maven project. Your only dependency should be org.springframework.beans, version 3.0.5.RELEASE. Then create a file called test.xsd where the contents are: <?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:beans="http://www.springframework.org/schema/beans"> <xsd:import namespace="http://www.springframework.org/schema/beans" /> <xsd:element name="test"> <xsd:simpleType> <xsd:list itemType="beans:identifiedType"> </xsd:list> </xsd:simpleType> </xsd:element> </xsd:schema> You might also have to disconnect your machine from the internet to reproduce the error. When you validate this schema, it will notify you that it "Cannot resolve the name 'beans:identifiedType' to a 'type definition' component." Note that this validation error is removed when an xml catalog entry points to the beans xsd file.
        Hide
        Martin Lippert (c) added a comment -

        Hey Steve!
        Thanks for the details. This should clearly be fixed. I will take a look at this.
        -Martin

        Show
        Martin Lippert (c) added a comment - Hey Steve! Thanks for the details. This should clearly be fixed. I will take a look at this. -Martin
        Hide
        Martin Lippert (c) added a comment -

        Hey Steve!

        I managed to fix a number of namespace issues with the recent builds of STS and Spring IDE. Therefore I don't see the error you mentioned anymore when I validate this file. However, I get this:

        "cos-st-restricts.1.1: The type '#AnonType_test' is atomic, so its

        {base type definition}

        , 'beans:identifiedType',
        must be an atomic simple type definition or a built-in primitive datatype."

        Do you see the same in your setting when you have the beans namespace added to the XML catalog?
        -Martin

        Show
        Martin Lippert (c) added a comment - Hey Steve! I managed to fix a number of namespace issues with the recent builds of STS and Spring IDE. Therefore I don't see the error you mentioned anymore when I validate this file. However, I get this: "cos-st-restricts.1.1: The type '#AnonType_test' is atomic, so its {base type definition} , 'beans:identifiedType', must be an atomic simple type definition or a built-in primitive datatype." Do you see the same in your setting when you have the beans namespace added to the XML catalog? -Martin
        Hide
        Martin Lippert (c) added a comment - - edited

        This should be fixed now and available with the upcoming 2.7.0 release.
        (however the observation and question from the comment above is still there)

        Show
        Martin Lippert (c) added a comment - - edited This should be fixed now and available with the upcoming 2.7.0 release. (however the observation and question from the comment above is still there)
        Hide
        Steve Storck added a comment -

        When I add the beans namespace to the XML catalog, I don't get any error like that. It validates without any errors or warnings in STS 2.6.1.SR1.

        Show
        Steve Storck added a comment - When I add the beans namespace to the XML catalog, I don't get any error like that. It validates without any errors or warnings in STS 2.6.1.SR1.

          People

          • Assignee:
            Martin Lippert (c)
            Reporter:
            Steve Storck
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              First Response Date: