Reputation: 11
application_context.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:aws-context="http://www.springframework.org/schema/aws/cloud/context"
xmlns:p="http://www.springframework.org/schema/p" xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/cloud/aws/context
http://www.springframework.org/schema/cloud/aws/spring-cloud-aws-context.xsd">
<aws-context:context-region region="us-west-2"/>
<aws-context:context-resource-loader/>
....</beans>
After compile, I got:
nested exception is org.xml.sax.SAXParseException; lineNumber: 12; columnNumber: 53; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'aws-context:context-region'.
Can someone help me with this problem? Thanks
Upvotes: 1
Views: 484
Reputation: 11
I got the answer from the Spring people. They stopped maintaining this and they are using the schmea.handler. See https://github.com/spring-cloud/spring-cloud-aws/blob/master/spring-cloud-aws-context/src/main/resources/META-INF/spring.handlers
Upvotes: 0
Reputation: 1895
Test this code
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aws-context="http://www.springframework.org/schema/cloud/aws/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/cloud/aws/context
http://www.springframework.org/schema/cloud/aws/context/spring-cloud-aws-context-1.0.xsd">
<aws-context:context-region region="us-west-2" />
<aws-context:context-credentials>
<aws-context:simple-credentials access-key="XXXXX" secret-key="XXXXXXX" />
<aws-context:context-resource-loader />
</beans>
Upvotes: 0
Reputation: 51
Change from:
http://www.springframework.org/schema/cloud/aws/spring-cloud-aws-context.xsd
To:
http://www.springframework.org/schema/cloud/spring-cloud-aws-context.xsd
but you can check if all your schemaLocations links return 200 ok before testing it. In case 404 you can find them individually under http://www.springframework.org/schema/cloud/
Upvotes: 1