Hi,
I have a project where I am trying to set up amqp-spring. I have tho following namespace at the top of my spring xml file:
This is where I am trying to declare the connection factoryCode:<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:rabbit="http://www.springframework.org/schema/rabbit" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/rabbit http://www.springframework.org/schema/rabbit/spring-rabbit-1.1.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd ">
I have the following dependencies set up in maven:Code:<rabbit:connection-factory id="rabbitConnectionFactory" addresses="taupoc1-agct:5672,taupoc2-agct:5672,taupoc3-agct:5672" />
When I try to run this app, as spring is loading the XML file I get this error:Code:<dependency> <groupId>org.springframework.amqp</groupId> <artifactId>spring-amqp</artifactId> <version>${versions.spring.integration.amqp}</version> <exclusions> <exclusion> <artifactId>spring-core</artifactId> <groupId>org.springframework</groupId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>${versions.springframework}</version> </dependency> <dependency> <groupId>com.rabbitmq</groupId> <artifactId>amqp-client</artifactId> <version>${versions.rabbitmq}</version> </dependency>
I think part of the problem is the fact that I am referencing the spring-rabbit-1.1.xsd instead of 1.0 (I do this because I need access to the addresses attribute in connection-factory.Code:Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/rabbit] Offending resource: class path resource [springConfig.xml] at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68) at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85) at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:80) ...
How can I resolve this issue? Am I missing a dependency or something?


Reply With Quote
