Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Failed conversion/cast getting connection factory through JNDI

119 views
Skip to first unread message

paul.ant...@gmail.com

unread,
Aug 15, 2017, 6:18:20 PM8/15/17
to
I am getting the following exception when trying to put a message on the queue:

Caused by: java.lang.IllegalStateException: Cannot convert value of type [com.ibm.ejs.jms.JMSQueueConnectionFactoryHandle] to required type [javax.jms.ConnectionFactory] for property 'connectionFactory': no
matching editors or conversion strategy found

It seems as though getting the connection factory object from JNDI resolves to JMSQueueConnectionFactoryHandle. My assumption is that there is something wrong with the configuration.

I am using spring, the following is my bean configuration:

<jee:jndi-lookup jndi-name="java:/comp/env/jms/mq/AlertsQCF" id="mqQueueConnectionFactory" resource-ref="false" />
<jee:jndi-lookup jndi-name="java:/comp/env/jms/mq/ALERTS.INPUT" id="messageDestination" resource-ref="false" />

<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
<property name="connectionFactory" ref="mqQueueConnectionFactory" />
<property name="receiveTimeout" value="10000" />
</bean>

<bean id="springJmsProducer" class="com.msg.corp.services.jms.SendMessageMq">
<property name="destination" ref="messageDestination" />
<property name="jmsTemplate" ref="jmsTemplate" />
</bean>

<bean id="springJmsConsumer" class="com.msg.corp.services.jms.ReceiveMessageMq">
<property name="destination" ref="messageDestination" />
<property name="jmsTemplate" ref="jmsTemplate" />
</bean>
0 new messages