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