2

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>
Community
  • 1
  • 1
haju
  • 1,278
  • 4
  • 20
  • 38
  • Hi Haju, can you cofirm that Eclipse is reporting this error? – Rob Kielty May 30 '12 at 15:39
  • Its within RAD 7.5 giving this error. Which is built on Eclipe 3.6 I believe. I am thinking I will have to drop the AMQ references and just create generic beans that reference the AMQ classes. – haju May 30 '12 at 17:56
  • 1
    I was able to validate your XML in the instance of Eclipse 3.6 that I use without error. Are you behind a proxy and is your instance of RAD configured for the proxy? – sully6768 May 31 '12 at 22:19
  • Yes you are right Sully, my password on the proxy expired 3 days ago and i did not reset within RAD. If you want to put that in the answer box I will flag it as correct. Lesson learned, test at home and not just at work. – haju Jun 01 '12 at 13:11

2 Answers2

1

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

Aron Lorincz
  • 1,677
  • 3
  • 19
  • 29
0

Anwer provided by Sully6768 in comments above:

No issue with the above code.

Issue caused by configuration settings within development workspace.

haju
  • 1,278
  • 4
  • 20
  • 38