Forum Stats

  • 3,758,202 Users
  • 2,251,352 Discussions


JMS not converting incoming message

1003915 Member Posts: 2
edited Apr 21, 2013 7:25PM in Java Message Service (JMS)
Hi All,

Am working on a System which is in JMS, which reads messages from WebSphere MQ. We are getting messages in EBCDIC format for eg - in place of blank we are getting 40.

Earlier it was working fine, we started using Jdk1.6 and this started showing up. Following code should do the conversion I believe -

try {
String sChangeMessage = ((TextMessage) message).getText();

catch (JMSException ex) {

but its not working, no exceptions. Can anyone help here. Thanks in advance

Edited by: user8819059 on Apr 18, 2013 6:02 AM

Edited by: user8819059 on Apr 18, 2013 6:02 AM


  • r035198x
    r035198x Member Posts: 2,499
    What happens when the code is run? Are any other logging messages printed? Did you try adding logging statements around the code to see which lines are being executed?
    Also, if the message is not a TextMessage them a ClassCastException will be thrown and your catch block won't catch it because it is not a JMSException.
  • 1003915
    1003915 Member Posts: 2
    No error message, have tried to test to catch any other Exception but no Luck. :(

    Does this conversion depends on CCSID set for MQ Queue manger??
This discussion has been closed.