Announcement Announcement Module
Collapse
No announcement yet.
Spring JMS configuration file problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring JMS configuration file problem

    I am using spring 2.5.4 and following is the snippet of my configuration file:

    <bean id="activeMqConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFacto ry">
    <property name="brokerURL" value="tcp://localhost:61616"/>
    </bean>

    <bean id="connectionFactory" class="org.springframework.jms.connection.SingleCo nnectionFactory">
    <property name="targetConnectionFactory" ref="activeMqConnectionFactory" />
    </bean>

    <bean id="listenerContainer" class="org.springframework.jms.listener.DefaultMes sageListenerContainer">
    <property name="concurrentConsumers" value="15" />
    <property name="connectionFactory" ref="connectionFactory" />
    <property name="destination" ref="processQueue" />
    <property name="messageListener" ref="myMessageQueueListener" />
    </bean>

    <bean id="myMessageQueueListener" class="com.StatsMessageQueueListener" >
    <property name="jmsTemplate" ref="jmsTemplate"/>
    </bean>

    When I am loading this configuration file the following exception is thrown:
    Thanks in Advance. Your prompt reply will be highly appreciated

    root cause

    java.lang.NoSuchMethodError: org.springframework.jms.listener.AbstractJmsListen ingContainer.createConnection()Ljavax/jms/Connection;
    org.springframework.jms.listener.AbstractJmsListen ingContainer.createSharedConnection(AbstractJmsLis teningContainer.java:401)
    org.springframework.jms.listener.AbstractJmsListen ingContainer.establishSharedConnection(AbstractJms ListeningContainer.java:370)
    org.springframework.jms.listener.DefaultMessageLis tenerContainer.establishSharedConnection(DefaultMe ssageListenerContainer.java:682)
    org.springframework.jms.listener.AbstractJmsListen ingContainer.doStart(AbstractJmsListeningContainer .java:257)
    org.springframework.jms.listener.AbstractJmsListen ingContainer.initialize(AbstractJmsListeningContai ner.java:172)
    org.springframework.jms.listener.AbstractPollingMe ssageListenerContainer.initialize(AbstractPollingM essageListenerContainer.java:203)
    org.springframework.jms.listener.DefaultMessageLis tenerContainer.initialize(DefaultMessageListenerCo ntainer.java:461)
    org.springframework.jms.listener.AbstractJmsListen ingContainer.afterPropertiesSet(AbstractJmsListeni ngContainer.java:135)
    org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1059)
    org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:363)
    org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:226)
    org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:147)
    org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:275)
    org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:320)
    org.springframework.web.context.support.AbstractRe freshableWebApplicationContext.refresh(AbstractRef reshableWebApplicationContext.java:134)
    org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:246)
    org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:184)
    org.springframework.web.context.ContextLoaderServl et.init(ContextLoaderServlet.java:83)
    javax.servlet.GenericServlet.init(GenericServlet.j ava:212)
    org.apache.catalina.startup.Catalina.start(Catalin a.java:552)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:585)
    org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:295)
    org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:433)
Working...
X