Support Article
Failure receiving MQ to JMS Message
SA-34403
Summary
User is trying to use Pega 7.2.2 to communicate using JMS in the following way:
- Pega 7.2.2 > JMS > MQ (there is an EIB layer managing the translation from JMS to MQ)
- MQ > JMS > Pega 7.2.2
User can send messages of type (TextMessage or BytesMessage) from Pega to JMS and it gets to MQ with no issues.
However, when MQ sends back a message (Text or Bytes), it arrives as a BytesMessage (perhaps the JMS middle layer is converting it), and Pega is not able to consume it, depending on the configuration, user gets a MessageEOFException, PRException or a ClassCastException (see the attached log file).
Error Messages
A MessageEOFException, PRException or a ClassCastException
Steps to Reproduce
Receive a Message from an MQ Server that uses a JMS middle layer.
Root Cause
With various trial, one got to know that message type and message data type is bytes, so in this case user is setting the message type as bytes but the message data type was set to String.
Due to this, it was throwing classcast exception.
Further setting the message data types to bytes, it is not possible to parse the message as XML.
It started throwing Parse XML Error.
To resolve this Pega mapped the message to clipboard using Java object type property and added java step in the activity to further convert the bytes message to string and apply parse xml rule.
Resolution
Perform the following local-change steps:
1. Change the message data type to Bytes.
2. Add java step as mentioned in root cause field to resolve the issue.
Published March 15, 2017 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.