jeudi 16 avril 2015

The matching wildcard is strict, but no declaration can be found for element 'aws-context:context-credentials

I have been trying to set up and test Amazon's SQS locally using the Spring cloud with AWS using the steps mentioned at cloud.spring.io


I have used maven to include the following dependencies



<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring-cloud-aws-version>1.0.0.RELEASE</spring-cloud-aws-version>
<java.version>1.7</java.version>
</properties>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-aws-autoconfigure</artifactId>
<version>${spring-cloud-aws-version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-aws-context</artifactId>
<version>${spring-cloud-aws-version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-aws-messaging</artifactId>
<version>${spring-cloud-aws-version}</version>
</dependency>


The dependencies were imported successfully. In my Spring config, I tried to set the aws context and the queueMessagingTemplate



<beans xmlns:xsi="http://ift.tt/ra1lAU"
xmlns:aws-messaging="http://ift.tt/1J7OJCw"
xmlns:aws-context="http://ift.tt/1ywltVD"
xmlns="http://ift.tt/GArMu6"
xsi:schemaLocation="http://ift.tt/GArMu6 http://ift.tt/1jdM0fG
http://ift.tt/1J7OJCw http://ift.tt/1J7OIhT
http://ift.tt/1ywltVD http://ift.tt/1ywlw3M">

<aws-context:context-credentials>
<aws-context:instance-profile-credentials />
</aws-context:context-credentials>

<aws-messaging:queue-messaging-template id="queueMessagingTemplate" />


The problem is in my spring context i am getting the error



cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'aws-
context:context-credentials'.
- schema_reference.4: Failed to read schema document 'http://ift.tt/1J7OIhV
context/spring-cloud-aws-context-1.0.xsd', because 1) could not find the document; 2) the document could not be
read; 3) the root element of the document is not <xsd:schema>.


The spring-cloud-aws-context-1.0.xsd is in the classpath in the spring-cloud-aws-context-1.0.0.RELEASE.jar but still the error is there. Not able to figure out why this is happening. If someone can tell me how to fix it, would be very helpful.


Thanks, Tatha





Aucun commentaire:

Enregistrer un commentaire