Author |
Message
|
BOBD |
Posted: Wed Oct 06, 2004 7:19 am Post subject: MQRC_UOW_ENLISTMENT_ERROR in .Net |
|
|
Novice
Joined: 01 Oct 2004 Posts: 12
|
I install MQ Client 5.3 sp7 and getting this error when I try to get message with MQC.MQPMO_SYNCPOINT option. I use code below:
queueIn = new MQQueue( queueManger,
replyToQueueName,
MQC.MQOO_INPUT_AS_Q_DEF + MQC.MQOO_FAIL_IF_QUIESCING ,
"",
"",
"");
MQGetMessageOptions getMsgOptions = new MQGetMessageOptions();
getMsgOptions.Options = MQC.MQPMO_SYNCPOINT+ MQC.MQGMO_NO_WAIT;
mqMessage = new MQMessage();
queueIn.Get(mqMessage,getMsgOptions);
messageBody = mqMessage.ReadString( mqMessage.DataLength);
If I remove MQC.MQPMO_SYNCPOINT option I dont get any errors.
Thanks in advance.
Bob |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Oct 06, 2004 8:25 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You need to use the SYNCPOINT option in the MQGMO structure when making Gets, not the SYNCPOINT option in the MQPMO structure (which is used when making Puts). _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kevinf2349 |
Posted: Wed Oct 06, 2004 9:51 am Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
Actually I believe that the MQGMO_SYNCPOINT and MQPMO_SYNCPOINT both equate to 2 so either one should work, however, I agree fully that for clarity the GMO_SYNCPOINT should be used in this case. |
|
Back to top |
|
 |
BOBD |
Posted: Wed Oct 06, 2004 9:58 am Post subject: |
|
|
Novice
Joined: 01 Oct 2004 Posts: 12
|
I changed code to use constant from MQGMO structure. It didn't help. Is there anything that can be done on MQ site? |
|
Back to top |
|
 |
kevinf2349 |
Posted: Wed Oct 06, 2004 10:39 am Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
If you are using syncpointing don't you have to do an MQBEGIN to indicate the start of a unit of work first? |
|
Back to top |
|
 |
BOBD |
Posted: Wed Oct 06, 2004 10:48 am Post subject: |
|
|
Novice
Joined: 01 Oct 2004 Posts: 12
|
My understanding that you dont have to do it because you specify options in Get(). I tried to add line
queueManger.Begin();
It fails with the same error. |
|
Back to top |
|
 |
kevinf2349 |
Posted: Wed Oct 06, 2004 10:57 am Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
What platform?
This from the retrun code helper
Another cause of MQRC_UOW_ENLISTMENT_ERROR is incorrect installation; Windows NT Service pack must be installed after the Windows NT Option pack. This reason code occurs only on Windows NT. |
|
Back to top |
|
 |
BOBD |
Posted: Wed Oct 06, 2004 11:15 am Post subject: |
|
|
Novice
Joined: 01 Oct 2004 Posts: 12
|
Client installed on Windows 2000 SP4. I can do put on the same queue manager (defferent queue) with MQPMO_SYNCPOINT and don't get any error. |
|
Back to top |
|
 |
kevinf2349 |
Posted: Wed Oct 06, 2004 11:43 am Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
What Match options do you have? |
|
Back to top |
|
 |
BOBD |
Posted: Wed Oct 06, 2004 11:58 am Post subject: |
|
|
Novice
Joined: 01 Oct 2004 Posts: 12
|
I dont have match option. Do I have to specify match option? I tried to spicify MatchOption = MQC.MQMO_NONE. The same error.
SyncpointAvailability shows that syncpoint is available. |
|
Back to top |
|
 |
EddieA |
Posted: Wed Oct 06, 2004 2:48 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
I can do put on the same queue manager (defferent queue) with MQPMO_SYNCPOINT and don't get any error. |
With the same, or a different, program.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Oct 06, 2004 3:06 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Do you have a global transaction setup? something like:
Code: |
[transaction]
void mymethod(...){
'here is the MQ code
} ' end method |
?? read up on the latest .NET documentation and on M$ transactional setup in .NET
Enjoy  |
|
Back to top |
|
 |
BOBD |
Posted: Wed Oct 06, 2004 4:16 pm Post subject: |
|
|
Novice
Joined: 01 Oct 2004 Posts: 12
|
I am not trying to do distributed transaction. All I want at this point is local transaction. What you are referring is transactional attribute(required only for distributed transactions)
Just in case if anybody has the same problem. Here is cause and resolution:
Temp workarounds setting the TMQ_DEFAULT_MODEL to FIXED or
the registry setting mentioned in the Technical Description.
The real solution is to rename mtxex.dll to something else
this dll shouldn't exist on a machine with NT4 on it, it was
introduced in this case by Q272569 - this could happen
again, so check for the existence of this dll.
The solution 1 to it being an environment variable is to set the following
registry key value HKLM\Software\IBM\MQSeries\CurrentVersion\ThreadModel
with a string value of FIXED.
solution 2 is to rename mtxex.dll to mtxex.bak
then GetObjectContext will not think MTS exists on the machine. |
|
Back to top |
|
 |
|