I'm getting this:
ERROR [ContextLoader] Context initialization failed org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'jmsTemplate' defined in ServletContext resource [/WEB-INF/applicationContext-services.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyAccessExceptions Exception: PropertyAccessExceptionsException (1 errors); nested propertyAccessExceptions are: [org.springframework.beans.TypeMismatchException: Failed to convert property value of type [org.jboss.mq.SpyConnectionFactory] to required type [javax.jms.ConnectionFactory] for property 'connectionFactory']
Any help is greatly appreciated!
I'm using Spring 1.2.3 + JBoss 4.0.3 RC2.
Here is a snippet of my applicationContext.xml:
<beans>
<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
<property name="connectionFactory">
<ref bean="connectionFactory"/>
</property>
</bean>
<bean id="connectionFactory" class="org.springframework.jndi.JndiObjectFactoryB ean">
<property name="jndiName">
<value>ConnectionFactory</value>
</property>
<property name="jndiTemplate">
<ref local="jndiTemplate"/>
</property>
<property name="resourceRef">
<value>false</value>
</property>
</bean>
<bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
<property name="environment">
<props>
<prop key="java.naming.factory.initial">org.jnp.interfac es.NamingContextFactory</prop>
<prop key="java.naming.provider.url">jnp://localhost:1099</prop>
<prop key="java.naming.factory.url.pkgs">org.jboss.namin g:org.jnp.interfaces</prop>
</props>
</property>
</bean>
</beans>



Reply With Quote