The XSD files spring-util-4.3.xsd and spring-context-4.3.xsd in the 4.3.23 release changed the schemaLocation for the xsd:import lines so now they refer to https URLs. in schemaLocation.
<xsd:import namespace="http://www.springframework.org/schema/beans" schemaLocation="https://www.springframework.org/schema/beans/spring-beans-4.3.xsd"/>
<xsd:import namespace="http://www.springframework.org/schema/tool" schemaLocation="https://www.springframework.org/schema/tool/spring-tool-4.3.xsd"/>
However the spring.schemas files in the spring-beans and spring-context jars do not contain entries for https urls, and MyEclipse Spring Editor (which is an extended version of Spring Tool Suite) now chokes on the XML context configuration files which were working fine with Spring 4.3.22 with various errors (cvc-elt.1, cvc-complex-type.2.4.c, Referenced file contains errors (http://..../spring-context-4.3.xsd...) and Referenced file contains errors (http://..../spring-utils-4.3.xsd...).
There are possible other XSD files pulling in other XSDs with a changed https location, I only encountered these two in my code, yet.
Comment From: jhoeller
This is being resolved fromspring.schemas
with automatic adaptation from https to canonical http URLs, by both the framework itself and by the recent STS 3.9.8 release. A corresponding STS upgrade should help.
Comment From: jhoeller
As a quick measure, could you possibly manually register those URLs as valid schemas (with downloaded xsd files) in the Eclipse XML editor?
Comment From: robvarga
Yeah, the problem is that an STS upgrade is probably not possible in a MyEclipse installation which integrates STS in its own product.
Is the URL lookup from spring.schemas used in runtime, or only by the editor?
Comment From: sbrannen
As a quick measure, could you possibly manually register those URLs as valid schemas (with downloaded xsd files) in the Eclipse XML editor?
That should definitely work.
I have done that in the past due to corporate firewalls blocking direct downloads of the schemas.
@robvarga, you should be able to configure that under Eclipse Preferences / XML / XML Catalog. There you can Add...
entries for schemas that you have on your local disk.
Comment From: jhoeller
spring.schemas
is primarily used at framework runtime but STS picks up the local xsd files from there as well. You could also try including a custom spring.schemas
file in your application classpath which adds explicit https mappings for those schemas, STS (even older versions) should pick it up from there as well.
Comment From: robvarga
I am doing the XML catalog approach at the moment, but it seems it is not sufficient to add only those two, as some validation steps still failed. I will try the custom spring.schemas first, although it may not be possible to put that file to the front of the classpath in a deterministic manner for unit tests (fortunately the app is a web-app, so putting it in WEB-INF/classes should take care of the full application).
How is the spring.schemas file picked up? Are all the spring.schemas files picked up and joined together (i.e. I can just add the additional entries to the custom file, or do I need to create a single file with all the spring.schemas files joined together added to WEB-INF/classes?)
Thanks for the quick answers and best regards,
Robert
Comment From: jhoeller
All spring.schemas
files should get picked up, with the order on the classpath being irrelevant (unless you want to override existing entries with a different value). So for your purposes, you'd just have to add a file with the specific missing entries.
That said, it'd be great if MyEclipse delivered an update built on STS 3.9.8 soon.
Comment From: robvarga
Adding the spring.schemas files to mirror the entries in the spring jars with https prefix in the classpath do fix the issue in MyEclipse.
Comment From: sbrannen
Adding the spring.schemas files to mirror the entries in the spring jars with https prefix in the classpath do fix the issue in MyEclipse.
Great.
Thanks for trying it out and for providing us feedback!