Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

com.ibm.jms.JMSBytesMessage incompatible with javax.JMS.TextMessage

807589Aug 6 2008 — edited Oct 20 2008
Hi,

We have two programs.
1. Message comes from external source and we have developed a program to route the message to different queues based on some conditions. I am using MDB to listen to the incoming message queue. Pick the messages and then route it.
2. My second program gets the routed message and then try to consume it and put in another queue after some processing.

I am getting an exception com.ibm.jms.JMSBytesMessage incompatible with javax.JMS.TextMessage
from the log of the second program log. This should be because the message I'm putting from the first program is in ibm mq message format but in Bytes and I'm trying to convert it into TextMessage to write into the queue for another program to pick them. I am getting the error on the statement (TextMessage)msg.getText().toString()
Here the incoming message is inside msg and rest is used to convert to TextMessage and write into the message using outMessage.writeString where outMessage is an object of the type MQMessage.

Please help me to sort this out since I'm running out of time here due to the deadline.

Thanks for looking at this.

Regards,
Arun Prithviraj
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 17 2008
Added on Aug 6 2008
30 comments
8,787 views