Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!

JMS message receiver from queue

Avatar

Former Community Member
Hi!<br /><br />I'm trying to establish a JMS queue connection with the LCES component 'JMS - Receive Message from queue'. Our queue settings are configured in a bindings file (.bindings) which is read by com.sun.jndi.fscontext.RefFSContextFactory (initial context).<br /><br />Finally I could setup LCES component to read the queue settings from the bindings file. But I was not able to receive any messages because I'm getting the follwing ClassCastException error:<br /><br /><i><br /><stalling action-instance: 1202 with message: <b>java.lang.ClassCastException: javax.naming.Reference</b><br /> at<br />com.adobe.livecycle.jms.QueueMessageReceiver.receiveMessageFromQueueWithPropertiesNoWait(QueueMessageReceiver.java:105)<br />at com.adobe.livecycle.jms.JMSService.receiveMessageFromQueue(JMSService.java:332)<br />at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)<br />at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)<br />at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.java:181)</i><br /><br />Does anybody has an idea how to solve this ClassCastException? I think this could be a classpath issue. But I have no idea which jar file needs to be added?<br /><br />Regards,<br />Nico
1 Reply

Avatar

Level 3
I may have seen this before. If you open up the "Components" View in Workbench you can see all of the Components (DSCs) that are present in the system. Look for the JMS Component and expand the "Active Services" View. Right Click the JMS Service and choose 'Edit Service Configuration". Look at the value for "Initial Context Factory" and make sure it is set. On My JBoss environment it is usually set to "org.jnp.interfaces.NamingContextFactory". Perhaps this might need to be set to "com.sun.jndi.fscontext.RefFSContextFactory" in your environment. One of the Avoka folks on the forum might also have suggestions.