ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » Empty MQ_ID and CORRELATION_ID

Post new topic  Reply to topic Goto page 1, 2  Next
 Empty MQ_ID and CORRELATION_ID « View previous topic :: View next topic » 
Author Message
peterw686
PostPosted: Mon Jul 26, 2004 5:55 am    Post subject: Empty MQ_ID and CORRELATION_ID Reply with quote

Acolyte

Joined: 26 Sep 2002
Posts: 73

Hi all,

We have a Java application which listens a MQ Queue CQ1 and sends the new message to another MQ Queue CQ2. Both java application and MQ server run on Sun solaris 8 machine.

The CQ1 and CQ2 are joined in a MQ cluster with third party vendors. Their MQ are running on MVS mainframe.

The java application uses JMS/MDB to listen the message. It converts the JMS MQ_ID and COR_ID from EBCDIC to ASCII code. When the application sends MQ message out by using MQ client. It passes the ASCII code MQ_ID to MQMessage directly.
Code:
mqMsg.messageId=msgIDStr.getBytes()


This application have run well for months. Recently, IBM updated some system patches, then, the vendor told us that all the message sent to them had the empty ID and correlation ID as below.
Quote:
Msg-Id:

hex value: 333333333344444444444444

(ebcdic) FFFFFFFFFF00000000000000



hex value: 111111111122222222222222

(ascii) AAAAAAAAAA00000000000000



CorrelId:

hex value: 333333333333444444444444

(ebcdic) FFFFFFFFFFFF000000000000





Does anyone have the same experience before? Any idea what coused this problem?


Thanks in advanced.

Peter
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Jul 26, 2004 6:10 am    Post subject: Re: Empty MQ_ID and CORRELATION_ID Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

peterw686 wrote:
It converts the JMS MQ_ID and COR_ID from EBCDIC to ASCII code.


That's a really really bad idea.

Message IDs and correlation IDs are not strings. So there's no "EBCDIC" data or "ASCII" data in them - since both of those describe CHARACTER sets, and message IDs and correlation IDs are BYTES.

So, yes, I would expect that if you were incorrectly treating these as character strings instead of byte values, that you would eventually run into problems because of it.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Mon Jul 26, 2004 6:38 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

Quote:

the vendor told us that all the message sent to them had the empty ID and correlation ID


They're not empty. Empty would be 00000000000000000000000000 in hex.

Talk to the sending app and find out what their code is for populating these 2 fields.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
peterw686
PostPosted: Mon Jul 26, 2004 7:32 am    Post subject: Reply with quote

Acolyte

Joined: 26 Sep 2002
Posts: 73

Thanks.

I know it's not a good idea to use String instead of working on bytes directly. Because we use JMS to handler message listening process, when we call the JMS API:
Code:
String getJMSMessageID() throws JMSException;
of Message, it will return String already. The String looks like this one:[ID:f0f4f0f2f0f5404040404040404040404040404040404040] which has 48 bytes.

The IBM MQ client API using "public byte[] messageId" to hold the message id; so I need a way to convert the JMS ID to byte[] MQID. Below is the program to do this job:
Code:
StringBuffer sb = new StringBuffer();
    for( int i=0; i<mqID.length(); i=i+2){
      String sub = mqID.substring(i, i+2);
      int val = Integer.valueOf(sub, 16).intValue();
      sb.append(new Character((char)val));
    }
    return sb.toString().trim();

After I got a java string of ASCII, I called that getBytes() to pass the byte[] to MQMessage.

Hopeful you can point out the error or if you have some suggestions or solutions. Thank you very much.
Back to top
View user's profile Send private message
peterw686
PostPosted: Mon Jul 26, 2004 7:55 am    Post subject: Reply with quote

Acolyte

Joined: 26 Sep 2002
Posts: 73

A interested thing I found from the log.

First, this is the good log:
Code:
2004-06-13 08:46:26,848 197072 DEBUG mdb.MDBean1:onMessage:145    -
JMS ID: [f4f6f1f9f3f4f5f0f6f44040404040404040404040404040]--[f0f0f0f0f0f0f0f1f1f3f3f2404040404040404040404040]
2004-06-13 08:46:26,849 197073 DEBUG mdb.MDBean1:onMessage:146    -
MQ ID: [ôöñùóôõðöô@@@@@@@@@@@@@@]--[ðððððððññóóò@@@@@@@@@@@@]

This is the log before IBM updated the system patches.

Second, this is the log encountered problem last week:
Code:
2004-07-19 16:45:47,150 10    DEBUG mdb.MDBean1:onMessage:145    -
JMS ID: [f2f7f8f6f1f2f2f2f3f24040404040404040404040404040]--[f0f0f0f0f0f0f0f2f1f4f2f4404040404040404040404040]
2004-07-19 16:45:47,158 18    DEBUG mdb.MDBean1:onMessage:146    -
MQ ID: [??????????@@@@@@@@@@@@@@]--[????????????@@@@@@@@@@@@]

This is the log after IBM updated the system patches.


It looks that it could convert JMS ID to correct Char (by using the codes in previous message).

Is this process platform or system dependanted?

Peter
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Jul 26, 2004 8:27 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I'm confused.

You're using JMS to get the message, and the plain Java MQI to put a reply?

Are you having transactional problems that you are trying to solve this way?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
peterw686
PostPosted: Mon Jul 26, 2004 9:08 am    Post subject: Reply with quote

Acolyte

Joined: 26 Sep 2002
Posts: 73

Yes.

We are using JMS to get message and using MQ client to forward message to another cluster queue due to these two queues are managed by different QMs.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Jul 26, 2004 10:15 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I still don't get it.

There's no reason you can't use JMS to talk to two different queue managers hosting two different queues.

You just need additional queue connection factory objects and destination objects.

And picking ONE method of accessing queues - either JMS or the more functional MQ API - would be a better thing to do.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
peterw686
PostPosted: Mon Jul 26, 2004 2:58 pm    Post subject: Reply with quote

Acolyte

Joined: 26 Sep 2002
Posts: 73

Hi,

I don't know the exact reason why they don't use JMS for sending message. Properly, it needs to set more properties which is not supported by JMS rather than MQ API.

I tried to shut down the Java application as well as MQ Qms and restart QMs and then Java application. It works again. I realized that I did shut down MQ without shutdown Java application before. Can this cause the problem?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Jul 27, 2004 4:43 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

peterw686 wrote:
I tried to shut down the Java application as well as MQ Qms and restart QMs and then Java application. It works again. I realized that I did shut down MQ without shutdown Java application before. Can this cause the problem?


You haven't identified the problem yet. It seems to be related to the format of Message and Correlation IDs - but it's not clear what the real problem is.

The "bad" IDs you were seeing are not, as Peter said, blank. And they're likely caused by issues with the sending application, or with your code.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
peterw686
PostPosted: Tue Jul 27, 2004 5:19 am    Post subject: Reply with quote

Acolyte

Joined: 26 Sep 2002
Posts: 73

This is something I don't know and I don't understand.

We used the same codes and it worked fine in past 5 months.

The error itself is not consistent. We could not re-produce the error as we want.

This morning, the error occured again. I check the error log on /var/mqm/errors and found some error log files. This is the one. Any idea or suggestion?
Code:

+-----------------------------------------------------------------------------+
|                                                                             |
| WebSphere MQ First Failure Symptom Report                                   |
| =========================================                                   |
|                                                                             |
| Date/Time         :- Monday July 26 21:53:40 EDT 2004                       |
| Host Name         :- dcoc9n (SunOS 5.8)                                     |
| PIDS              :- 5724B4103                                              |
| LVLS              :- 530                                                    |
| Product Long Name :- WebSphere MQ for Sun Solaris                           |
| Vendor            :- IBM                                                    |
| Probe Id          :- XC338001                                               |
| Application Name  :- MQM                                                    |
| Component         :- xehAsySignalHandler                                    |
| Build Date        :- Oct 12 2002                                            |
| CMVC level        :- p000-L021011                                           |
| Build Type        :- IKAP - (Production)                                    |
| UserID            :- 00001005 (mqm)                                         |
| Program Name      :- runmqlsr_nd                                            |
| Process           :- 00007519                                               |
| Thread            :- 00000002                                               |
| Major Errorcode   :- xecE_W_UNEXPECTED_ASYNC_SIGNAL                         |
| Minor Errorcode   :- OK                                                     |
| Probe Type        :- MSGAMQ6209                                             |
| Probe Severity    :- 3                                                      |
| Probe Description :- AMQ6109: An internal WebSphere MQ error has occurred.  |
| FDCSequenceNumber :- 0                                                      |
| Arith1            :- 1 1                                                    |
| Arith2            :- 7519 1d5f                                              |
| Comment1          :- SIGHUP                                                 |
|                                                                             |
|                                                                             |
+-----------------------------------------------------------------------------+
 
Back to top
View user's profile Send private message
bower5932
PostPosted: Tue Jul 27, 2004 6:14 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

Your FDC indicates that you are running the base level of the code. I'd suggest that you install the latest CSD to see if it helps.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
clindsey
PostPosted: Tue Jul 27, 2004 7:33 am    Post subject: Reply with quote

Knight

Joined: 12 Jul 2002
Posts: 586
Location: Dallas, Tx

I agree with Mr. Bower that you should apply the latest fixpack but this particular FDC does not indicate a problem at all. It is just reporting the fact that someone did a kill -1 on the listener process probably trying to stop it.

Charlie
Back to top
View user's profile Send private message
peterw686
PostPosted: Wed Jul 28, 2004 5:34 am    Post subject: Reply with quote

Acolyte

Joined: 26 Sep 2002
Posts: 73

Hi Charlie,

Sorry I don't fully understand your last sentence. Is this a ignorable error?

Thanks for help.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Wed Jul 28, 2004 5:58 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

I *think* this type of FDC is thrown when you start up the listener in the foreground, and then log off your session.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » General IBM MQ Support » Empty MQ_ID and CORRELATION_ID
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.