Received message is not an instance of a text message: <class or interface> <fully qualified name of the class>
Problem
The JMS Consumer in IBM Sterling® Order Management System expects a text message in the message body and
when it encounters a different message type like
ByteMessage
,
ObjectMessage
, MapMessage
, or StreamMessage
, it
throws an error in the following
format:Received message is not an instance of a text message: <class or interface> <fully qualified name of the class>
For example, IBM Sterling Order Management System throws the following error:
Received message is not an instance of a text message: interface javax.jms.BytesMessagewhen it encounters a
ByteMessage
in the JMS Queue.Solution
When the JMS Consumer encounters the problem described earlier, the following information is also
printed along with the error message:
- Message ID - It uniquely identifies each message that is sent by a provider.
- Destination object for this message - The Queue name.
- Message time stamp - It is the time when a message to be sent is handed off to a provider.
- Correlation ID for the message - This is either the provider-specific message ID or application-specific String value.
- DeliveryMode value specified for this message - It might be PERSISTENT (Value = 1) or NON_PERSISTENT (Value = 2). These are enumerated types, integer values are displayed.
- Message type identifier supplied by the client when the message is sent.
Assess or sort these details, identify the source of the message, and make adjustments in the
corresponding message sender tool to send a TextMessage
in the message body.