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 » WebSphere Message Broker (ACE) Support » Cannot set Msd properly on JMS message.

Post new topic  Reply to topic Goto page 1, 2  Next
 Cannot set Msd properly on JMS message. « View previous topic :: View next topic » 
Author Message
ccrandall
PostPosted: Tue Sep 21, 2010 8:55 am    Post subject: Cannot set Msd properly on JMS message. Reply with quote

Acolyte

Joined: 23 Oct 2008
Posts: 52

We are migrating from MB 6.0.0.6 to MB 7.0.0.1. While migrating our broker framework, we started to get errors from Java MDBs running on WAS 7. The error we've been getting looks like:

[WMQJCAResourceAdapter : 0] 9/17/10 15:00:08:219 ERROR AbstractMessageBean - Received a com.ibm.jms.JMSBytesMessage: I do not support handling of a com.ibm.jms.JMSBytesMessage. MessageId=ID:414d512045434b3032424431202020204c8866522011b72c

When looking at the messages, we noticed that the Msd field under the Mcd folder has a different value now. Under MB 6 the value was 'jms_text' and now under MB 7 it is 'xmlnsc'.

Looking at the documentation for both MQ 7 and MB 7 shows conflicting information for what should be in the Msd field. The documentation for this under MQ 7 can be found here:

http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzaw.doc/jm25440_.htm?resultof=%22%6a%6d%73%5f%74%65%78%74%22%20

It clearly states that the Msd field should have values 'jms_none', 'jms_text', 'jms_bytes', 'jms_map', 'jms_stream', or 'jms_object'. This would make sense since using 'jms_text' worked with our MDB and the error seems to indicate that it doesn't know what type our message is and it is defaulting to a BytesMessage which it is not.

For MB 7, the documentation is located at: http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/topic/com.ibm.etools.mft.doc/aq06940_.htm

And for Msd it says...

<Msd>
Message service domain
Valid values are:
mrm
The message is parsed by the MRM domain.
xmlnsc
The message is XML and is parsed by the XMLNSC domain.
xmlns
The message is XML and is parsed by the XMLNS domain.
xml
The message is XML and is parsed by the XML domain.
mime
The message uses the MIME standard and is parsed by the MIME domain.
idoc
The message is an SAP ALE IDoc from the WebSphere MQ Link for R/3, and is parsed by the IDOC domain.
none
The message is treated as an opaque BLOB, and delivered to the recipient without modification.
See Parsers for a description of each domain.

I'm not sure why our MDB would care or even know what these parser types are, so I'm not sure why MB would be using these values in the Msd.

Upon further investigation, it looks like this behavior goes back to MB 6.1. So, I'm a little surprised that conflicting information that goes back a few years hasn't seemed to attract a lot of attention. Searching the forum here, I see very little about the Mcd/Msd folder. What we did see shows that there's a parameters called MQSI_DISABLE_CREATE_RFH2_MCD that looks like it might disable the functionality in the broker to automatically generate this folder. However, we tried setting this and it did not help.

Any idea how we can go back to using the values in our Msd that MQ specifies and not the ones in the MB documentation??

Thanks
Curt
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Sep 21, 2010 11:47 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
we tried setting this and it did not help.
Please excuse the question, but are you 100% certain that you set the environment variable in the broker's environment? In the past, others have tried and got it wrong.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Sep 21, 2010 1:21 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

The msd field is not what defines whether you have a JMSText or a JMSBytes message.
That determination is being done according to the format field on either the MQMD or the RFH header if you have one!

This question had already been asked in a similar way on the forum. Maybe a search would have pointed you that way?

Read up on what header chaining means in terms of defining the format of the data.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
ccrandall
PostPosted: Tue Sep 21, 2010 1:42 pm    Post subject: Reply with quote

Acolyte

Joined: 23 Oct 2008
Posts: 52

fjb_saper wrote:
The msd field is not what defines whether you have a JMSText or a JMSBytes message.
That determination is being done according to the format field on either the MQMD or the RFH header if you have one!


The MQ 7 documentation says otherwise:

The <mcd> folder
This folder contains properties that describe the shape or format of the message. For example, the Msd property identifies the message as being Text, Bytes, Stream, Map, Object, or null. This folder is always present in a JMS MQRFH2.

And the behavior of the MDB corraborates that assertion.

fjb_saper wrote:

This question had already been asked in a similar way on the forum. Maybe a search would have pointed you that way?

Read up on what header chaining means in terms of defining the format of the data.

Have fun


As mentioned, I did a search and came up with little. I'll try looking for info on header chaining, though. Thanks.
Back to top
View user's profile Send private message
ccrandall
PostPosted: Tue Sep 21, 2010 1:44 pm    Post subject: Reply with quote

Acolyte

Joined: 23 Oct 2008
Posts: 52

kimbert wrote:
Quote:
we tried setting this and it did not help.
Please excuse the question, but are you 100% certain that you set the environment variable in the broker's environment? In the past, others have tried and got it wrong.


Our admins did the set up. Unfortunately they've left for the day, but I will follow up tomorrow.

Thanks!
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Sep 21, 2010 2:07 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

ccrandall wrote:
fjb_saper wrote:
The msd field is not what defines whether you have a JMSText or a JMSBytes message.
That determination is being done according to the format field on either the MQMD or the RFH header if you have one!


The MQ 7 documentation says otherwise:

The <mcd> folder
This folder contains properties that describe the shape or format of the message. For example, the Msd property identifies the message as being Text, Bytes, Stream, Map, Object, or null. This folder is always present in a JMS MQRFH2.

And the behavior of the MDB corraborates that assertion.

fjb_saper wrote:

This question had already been asked in a similar way on the forum. Maybe a search would have pointed you that way?

Read up on what header chaining means in terms of defining the format of the data.

Have fun


As mentioned, I did a search and came up with little. I'll try looking for info on header chaining, though. Thanks.


Not quite what I get from the documentation:
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzak.doc/fr14440_.htm
and http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzak.doc/fr14610_.htm

Note that in those fields referenced in the documentation there is no reference to the mcd folder.

The documentation also tells me that this is message content descriptor (mcd ) folder, mainly used in SOAP messages and in the message Service folder documentation there is a list of values for the mcd...

So please do me a favor and set the Format field on the RFH header and let us know how you fare.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
ccrandall
PostPosted: Wed Sep 22, 2010 6:40 am    Post subject: Reply with quote

Acolyte

Joined: 23 Oct 2008
Posts: 52

fjb_saper wrote:
Not quite what I get from the documentation:
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzak.doc/fr14440_.htm
and http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzak.doc/fr14610_.htm

Note that in those fields referenced in the documentation there is no reference to the mcd folder.


I'm not quite sure what FORMAT has to do with this. Can you explain?

I think the reason you aren't seeing the reference to mcd in the links above is because: 1.) the first link is for RFH and mcd is in the RFH2 header, 2.) they are only showing the fixed portion of the RFH(2) header and not the variable portion.

fjb_saper wrote:

The documentation also tells me that this is message content descriptor (mcd ) folder, mainly used in SOAP messages and in the message Service folder documentation there is a list of values for the mcd...


Where are you seeing the mcd is usually used with a SOAP message? As I understand, this is required for JMS messaging and the link you provide is really showing SOAP over JMS information... so naturally the mcd would need to be present.

Furthermore, in your first link you can see that the Msd field is not the parser name:

52464820 00000002 000002B0 00000001 RFH␢ 0002 1208 0001
000004B8 20202020 20202020 00000000 1208 ␢ ␢ ␢ ␢ ␢ ␢ ␢ ␢ 0000
000004B8 1208
32 <mcd>
<Msd>jms_bytes</Msd>
</mcd>␢
208 <jms>
<Dst>queue://queue://SOAPJ.demos</Dst>
<Rto>queue://WMQSOAP.DEMO.QM/SYSTEM.SOAP.RESPONSE.QUEUE</Rto>
<Tms>1157388516465</Tms>
<Cid>ID:000000000000000000000000000000000000000000000000</Cid>
<Dlv>1</Dlv>
</jms>

The fact that the second link shows different values for Msd concerns me as the IBM documentation (and even the message back from our lab advocate) indicates that there's a lot of inconsistency related to this field.
[/quote]

fjb_saper wrote:

So please do me a favor and set the Format field on the RFH header and let us know how you fare.


I'm looking at the docs, but honestly I have no clue what value would belong here. Any ideas?

Thanks!
Back to top
View user's profile Send private message
ccrandall
PostPosted: Wed Sep 22, 2010 7:00 am    Post subject: Reply with quote

Acolyte

Joined: 23 Oct 2008
Posts: 52

kimbert wrote:
Quote:
we tried setting this and it did not help.
Please excuse the question, but are you 100% certain that you set the environment variable in the broker's environment? In the past, others have tried and got it wrong.


I checked with our MQ/MB admin and he has a Korn Shell script that starts up the brokers. So, on the machine running the broker, he set that variable to 1 and then exported that variable to the environment. He also verified that the export was successful.

I'm assuming that would be the correct way to do this, right?

Thanks
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Sep 22, 2010 7:06 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

ccrandall wrote:
I'm assuming that would be the correct way to do this, right?


Only if the shell inherits it's environment from the exported one, which does depend on how it's started.

Better IMHO to set it explicitly inside the script.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
ccrandall
PostPosted: Wed Sep 22, 2010 7:44 am    Post subject: Reply with quote

Acolyte

Joined: 23 Oct 2008
Posts: 52

As I understand, the code to set and export that variable is in the broker start up script.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Sep 22, 2010 11:55 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Quote:
fjb_saper wrote:


So please do me a favor and set the Format field on the RFH header and let us know how you fare.



I'm looking at the docs, but honestly I have no clue what value would belong here. Any ideas?

Thanks!

Any valid value from the format constants. MQFMT_NONE or MQFMT_STRING to name the most common ones (from memory)
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Wed Sep 22, 2010 12:46 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Being an old school MQ Programmer I tend to look in the file "cmqc.h" for the definitive list of all WMQ message settings.
This is found in your WMQ Installation directory tree under tools/c/inc or thereabouts.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
ccrandall
PostPosted: Wed Sep 22, 2010 3:41 pm    Post subject: Reply with quote

Acolyte

Joined: 23 Oct 2008
Posts: 52

smdavies99 wrote:
Being an old school MQ Programmer I tend to look in the file "cmqc.h" for the definitive list of all WMQ message settings.
This is found in your WMQ Installation directory tree under tools/c/inc or thereabouts.


Good idea! Unfortunately, with my installation (MQ 7.0.1.0 and MB 7.0.0.0
on XP) I do not see cmqc.h anywhere under C:\Program Files\ibm. However, I did find the documentation for that. I'm guessing the header file I really need to look at is the cmqpcs.h as these fields are defined in the pub/sub domain.

According to that documentation and another file called BipRfc.h (C:\Program Files\ibm\MQSI\7.0\include) the Msd field in the Mcd folder is represented by:

#define MQMCD_MSG_DOMAIN "Msd"

And for the values for this field:

/* Tag values */
#define MQMCD_DOMAIN_NONE "none"
#define MQMCD_DOMAIN_NEON "neon"
#define MQMCD_DOMAIN_MRM "mrm"
#define MQMCD_DOMAIN_JMS_NONE "jms_none"
#define MQMCD_DOMAIN_JMS_TEXT "jms_text"
#define MQMCD_DOMAIN_JMS_OBJECT "jms_object"
#define MQMCD_DOMAIN_JMS_MAP "jms_map"
#define MQMCD_DOMAIN_JMS_STREAM "jms_stream"
#define MQMCD_DOMAIN_JMS_BYTES "jms_bytes"

I am convinced that the MB 6.1/7.0 and some of the MQ 7.0 documentation is flat our wrong. The message broker parser name does not belong in the Msd field. Our MDB on WAS 7, which are using the same MQ libs, are puking on the xmlnsc value and it makes no sense to me to use this field to put something that's MB specific there.

The fact that MB is overrriding our attempts to put the correct value "jms_text" in the OutputRoot.MQRFH2.mcd.Msd file is a bug, plain and simple. I'm surprised that it's been this way since MB 6.1, so I guess there's a workaround, but to me this is just behavior that IBM needs to correct.

We'll see what our PMR yields.

Thanks!
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Sep 22, 2010 6:10 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

ccrandall wrote:
The message broker parser name does not belong in the Msd field.


Um. I think you'll find that the Msd folder was originally created for the express purpose of Broker and thus really does deserve and is designed to hold the name of the broker parser.

ccrandall wrote:
I'm surprised that it's been this way since MB 6.1, so I guess there's a workaround, but to me this is just behavior that IBM needs to correct.


No, I don't think the Msd Folder was introduced in MB 6.1. And I don't know that there has been a version of Broker since 2.1 that would let you directly manipulate it.

Now, I grant, I could be mistaken in this. But I consider it less likely than the alternative.

ccrandall wrote:
We'll see what our PMR yields.


I do hope you've linked to this post.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Sep 22, 2010 6:28 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

The reason why you're getting a JMSBytes message instead of a JMSTextMessage is because the format on the RFH2 header is set to MQFMT_NONE, or has not been set at all.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Cannot set Msd properly on JMS message.
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.