Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Expect a TextMessage, but receive type: JMSMapMessage

SA-3034

Summary



When only one JMS message of type TextMessage is sent to the JMS destination, a TextMessage is received and successfully processed by the Pega 7 Platform. However, another message of type MapMessage is received and the log displays the error.

Error Messages


2014-10-21 00:15:37,559 [stenerThreadPool : 0] [ STANDARD] [ <application>] ( services.jms.JMSListener) ERROR <operator> - Caught exception in JMS service listener <listenername>

com.pega.pegarules.pub.PRException: Expecting a TextMessage, received a message of type: com.ibm.jms.JMSMapMessage
From: (unknown)
at com.pega.pegarules.integration.engine.internal.services.jms.JMSListener.readRequestData(JMSListener.java:1848)
at com.pega.pegarules.integration.engine.internal.services.jms.JMSListener.handleRequest(JMSListener.java:1279)
at com.pega.pegarules.integration.engine.internal.services.jms.JMSListener.runOnce(JMSListener.java:716)
at com.pega.pegarules.integration.engine.internal.services.jms.JMSListenerServant.invoke(JMSListenerServant.java:111)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl._invokeEngine_privact(EngineImpl.java:312)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:263)
at com.pega.pegarules.session.internal.engineinterface.etier.ejb.EngineBean.invokeEngine(EngineBean.java:225)
at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:600)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:419)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:460)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingException(PRBootstrap.java:482)
at com.pega.pegarules.internal.etier.ejb.EngineBeanBoot.invokeEngine(EngineBeanBoot.java:168)
at com.pega.pegarules.internal.etier.interfaces.EJSLocalStatelessEngineCMT_021cb84d.invokeEngine(Unknown Source)
at com.pega.pegarules.session.internal.engineinterface.etier.mdb.PRJMSListener.callEngine(PRJMSListener.java:207)
at com.pega.pegarules.session.internal.engineinterface.etier.mdb.PRJMSListener.onMessage(PRJMSListener.java:129)
at sun.reflect.GeneratedMethodAccessor365.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:600)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:419)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:460)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:509)
at com.pega.pegarules.internal.etier.mdb.PRJMSListenerBoot.onMessage(PRJMSListenerBoot.java:91)
at com.ibm.ejs.jms.listener.MDBWrapper$PriviledgedOnMessage.run(MDBWrapper.java:302)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:63)
at com.ibm.ejs.jms.listener.MDBWrapper.callOnMessage(MDBWrapper.java:271)
at com.ibm.ejs.jms.listener.MDBWrapper.onMessage(MDBWrapper.java:240)
at com.ibm.mq.jms.MQSession$FacadeMessageListener.onMessage(MQSession.java:147)
at com.ibm.msg.client.jms.internal.JmsSessionImpl.run(JmsSessionImpl.java:2846)
at com.ibm.mq.jms.MQSession.run(MQSession.java:862)
at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:1055)
at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:1082)
at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:752)
at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:718)
at sun.reflect.GeneratedMethodAccessor364.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:600)
at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:47)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:98)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:136)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:574)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1656)

 

Steps to Reproduce

  1. Configure the JMS MDB listener with TextMessage and post a message.
  2. Check the log for the following error:
2014-10-21 00:15:37,559 [stenerThreadPool : 0] [ STANDARD] [ <application>] ( services.jms.JMSListener) ERROR <operator> - Caught exception in JMS service listener <listenername>
com.pega.pegarules.pub.PRException: Expecting a TextMessage, received a message of type: com.ibm.jms.JMSMapMessage

Root Cause


There was a misconfiguration at the JMS messaging server end. The Pega 7 Platform was not expecting a JMS response while there was a response JMS message of type MapMessage being sent.

Resolution


Perform the following local change.

Reconfigure the messaging server not to send a response message:
In the Response tab of the Service JMS rule, specify the following settings:
Condition = Default
Message Type = none
Requestor Options = close after response
Suggest Edit

Published January 31, 2016 - Updated October 8, 2020

Did you find this content helpful? Yes No

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us