org.apache.activemq.jndi.ReadOnlyContext cannot be cast to javax.jms.Destination

Document created by Ramya_Nakkapalle Employee on Dec 3, 2015
Version 1Show Document
  • View in full screen mode
When it is made sure that all the required jars are in place but still the process(performing Send Operation with JMS Connector, ActiveMQ being the JMS Server Type) fails with similar error as below:


Stack Trace:

java.lang.ClassCastException: org.apache.activemq.jndi.ReadOnlyContext cannot be cast to javax.jms.Destination
    at com.boomi.connector.jms.adapter.JndiAdapter.createDestination(
    at com.boomi.connector.jms.JMSUtil.createProducer(
    at com.boomi.connector.jms.JMSSend.processBatch(
    at com.boomi.connector.jms.JMSSend.sendMessages(
    at com.boomi.connector.jms.JMSSend.send(
    at com.boomi.connector.custom.CustomSendConnectorAction.invoke(
    at com.boomi.connector.base.BaseConnectorAction.invokeBase(
    at com.boomi.connector.base.BaseConnectorAction.invoke(
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
Check if the 'Destination' field on the JMS Connector Operation is empty. If so, that is possibly causing the issue. The Destination needs a value to perform the operation successfully.

The value will be similar as below.