haju
haju

Reputation: 1298

Spring 3 ActiveMQ Error - AMQ Tag Not Recognized

Description: Based on other Similar issues listed below, it seems I would have a namespace issue or bad link in my Spring file to generate this error. I tested each link but each one seems to work. Looking for thoughts and suggestions on what I might be missingÉ

Error In Spring File: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'amq:connectionFactory'

Similar Issues: StackoverFlow Posting

Spring Configuration File:

<beans 
 xmlns="http://www.springframework.org/schema/beans"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xmlns:aop="http://www.springframework.org/schema/aop"
 xmlns:context="http://www.springframework.org/schema/context"
 xmlns:jms="http://www.springframework.org/schema/jms"
 xmlns:amq="http://activemq.apache.org/schema/core"
 xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context-3.0.xsd
        http://www.springframework.org/schema/jms 
        http://www.springframework.org/schema/jms/spring-jms.xsd
        http://activemq.apache.org/schema/core 
        http://activemq.apache.org/schema/core/activemq-core-5.6.0.xsd">



    <amq:connectionFactory  id="connectionFactory" brokerURL="tcp://localhost:61616" />

    <amq:queue id="topic" physicalName="spitter.alert.topic" />


    <!-- *****JMS TEMPLATE**** -->
    <bean   id="jmsTemplate"
            class="org.springframework.jms.core.JmsTemplate">
        <property name="connectionFactory" ref="connectionFactory"/>
        <property name="defaultDestinationName" value="spittle.alert.topic"/>
    </bean>

    <bean id="spittleHandler" class="com.habuma.spitter.alerts.SpittleAlertHandler" />

    <jms:listener-container connection-factory="connectionFactory">
        <jms:listener destination="spitter.alert.topic" ref="spittleHandler"
            method="processSpittle" />
    </jms:listener-container>
</beans>

Upvotes: 2

Views: 2240

Answers (2)

Aron Lorincz
Aron Lorincz

Reputation: 1707

I had the same problem, and after experimenting with the order of namespace declarations, it had been solved.

Upvotes: 1

haju
haju

Reputation: 1298

Anwer provided by Sully6768 in comments above:

No issue with the above code.

Issue caused by configuration settings within development workspace.

Upvotes: 0

Related Questions