• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need guidance on Introduction to Spring JMS Active MQ - icoding club

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am following ar blog which is very good for someone like me who wants to get into Spring, JMS and ActiveMQ…
http://icodingclub.blogspot.com/2011/07/introduction-of-spring-jms-with.html

When I run TestJMSListener as a java application, I am getting following error:
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'connectionFactory' defined in class path resource [com/jms/helloworld/config/JMSConfig.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'brokerurl' of bean class [org.apache.activemq.ActiveMQConnectionFactory]: Bean property 'brokerurl' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

I do not know how to fix it, below is my JMSConfig.xml file:

<beans xmlns:jms="http://www.springframework.org/schema/jms"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.springframework.org/schema/beans"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/jms
http://www.springframework.org/schema/jms/spring-jms-3.0.xsd">
<bean class="org.apache.activemq.command.ActiveMQQueue" id="destination">
<constructor-arg value="TEST.Q1"></constructor-arg>
</bean>
<bean class="org.apache.activemq.ActiveMQConnectionFactory" id="connectionFactory"
p:brokerurl="tcp://localhost:61616"></bean>
<bean class="com.jms.helloworld.listner.MessageListenerImpl" id="simpleMessageListener"> </bean>
<bean class="org.springframework.jms.listener.DefaultMessageListenerContainer" id="jmsContainer">
<property name="connectionFactory" ref="connectionFactory"></property>
<property name="destination" ref="destination"></property>
<property name="messageListener" ref="simpleMessageListener"></property>
</bean>
</beans>


Thanks a lot.

Also which are good java forums where I can get help on something like this.


Prem
 
Ranch Hand
Posts: 417
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

Welcome to the ranch!

Here is the docs:
http://activemq.apache.org/maven/apidocs/org/apache/activemq/ActiveMQConnectionFactory.html

There is no property named brokerurl:


Invalid property 'brokerurl' of bean class [org.apache.activemq.ActiveMQConnectionFactory]: Bean property 'brokerurl' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?



The correct name for the property is brokerURL, with uppercase letters for "URL". Just replace brokerurl for brokerURL in your config file.
 
Prem Mehrotra
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you so much, you resolved my problem. It shows you power of these forums, otherwise I would have struggled for days.
reply
    Bookmark Topic Watch Topic
  • New Topic