IBM Support

Cannot work jms queue in websphere

Troubleshooting


Problem

When working with the jms websphere queue, an error is returned.

Symptom

javax.jms.IllegalStateException: CWSIA0110E: It is only permitted to call the operation acknowledge on a message that was obtained using a receive call, or a message presented to a MessageListener.
at com.ibm.ws.sib.api.jms.impl.JmsMessageImpl.acknowledge(JmsMessageImpl.java:2073)
at com.bam.jmsevent.CQJMSMDBean.onMessage(CQJMSMDBean.java:52)
at com.ibm.ejs.container.MessageEndpointHandler.invokeMdbMethod(MessageEndpointHand ler.java:991)
at com.ibm.ejs.container.MessageEndpointHandler.invoke(MessageEndpointHandler.java: 724)
at $Proxy0.onMessage(Unknown Source)
at com.ibm.ws.sib.api.jmsra.impl.JmsJcaEndpointInvokerImpl.invokeEndpoint(JmsJcaEnd pointInvokerImpl.java:201)
at com.ibm.ws.sib.ra.inbound.impl.SibRaDispatcher.dispatch(SibRaDispatcher.java:572 )
at com.ibm.ws.sib.ra.inbound.impl.SibRaSingleProcessListener$SibRaWork.run(SibRaSin gleProcessListener.java:463)
at com.ibm.ejs.j2c.work.WorkProxy.run(WorkProxy.java:447)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1471)

Resolving The Problem

Need to make couple of changes.
a) IN the Java src code you need to comment the following line in the onMessage() Method
Look for the following method.
public void onMessage(Message msg)
and comment the line.
//msg.acknowledge();
THis is specific to websphere application server.

b) In the JMSMdb.properties.template, the instance name should be lava
instancename=lava

The java src code is CQJMSMDBean.java located under samples\cqmdb\com\bam\jmsevent

[{"Product":{"code":"SSNGSH","label":"Cognos Now!"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Cognos Now!","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF025","label":"Platform Independent"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"Cognos Now! 4.3","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Historical Number

1040986

Document Information

Modified date:
15 June 2018

UID

swg21348114