I am trying to upgrade my spring version from "4.1.5.RELEASE" to "5.0.3.RELEASE" (the latest).
When I go to any version beyond "4.2.1.RELEASE", I am getting the following error:
Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 676 in XML document from class path resource [SpringConfig.xml] is invalid; nested exception is org.xml.sax.SAXParseException; systemId: http://www.jasypt.org/schema/encryption/jasypt-spring31-encryption-1.xsd; lineNumber: 676; columnNumber: 67; src-resolve: Cannot resolve the name 'context:propertyPlaceholder' to a(n) 'type definition' component.
Caused by: org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'context:propertyPlaceholder' to a(n) 'type definition' component.
I have tracked it down to the Spring folks renaming the "propertyPlaceholder" type to "propertyLoading" in their spring-context-4.2.xsd starting in release "4.2.2.RELEASE".
The JASypt component I am using extends the propertyPlaceholder type and this reference is causing the error. The reference can be seen from this URL:
http://www.jasypt.org/schema/encryption/jasypt-spring31-encryption-1.xsd
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="context:propertyPlaceholder">
<xsd:attribute name="encryptor" type="xsd:string" use="required">
They are including a much older version of the spring-context XSD file (version 3.1):
<xsd:import namespace="http://www.springframework.org/schema/beans" schemaLocation="http://www.springframework.org/schema/beans/spring-beans-3.1.xsd"/>
<xsd:import namespace="http://www.springframework.org/schema/tool" schemaLocation="http://www.springframework.org/schema/tool/spring-tool-3.1.xsd"/>
<xsd:import namespace="http://www.springframework.org/schema/context" schemaLocation="http://www.springframework.org/schema/context/spring-context-3.1.xsd"/>
What is the easiest way to overcome this error since I don't "control" this XSD? Thanks.