Reason 2277: FAILED: MQRC_CD_ERROR

Asked by mseaspring

MQ version:5.3
when I running blow code:

import pymqi

channel='SYSTEM.DEF.SVRCONN'
host='133.xxx.xx.xxx' #modify by me
port=16509
conn_info="%s(%s)"%(host,port)
qmgr=pymqi.QueueManager(None)
queue_manager='UOQMCD'
queue_name='UOMQCD.ORDERINFO.OUT'
mq_sid=1381
print queue_manager
print pymqi.__mqbuild__
qmgr.connectTCPClient(queue_manager,pymqi.cd(),channel,conn_info)
queue=pymqi.Queue(qmgr,queue_name)
print queue_manager

message = queue.get()
print message
queue.close()
qmgr.disconnect()

I got a error,I am sure host,port,conn_info,queue_manager,queue_name are right.
Please help me. Thanks for you action!

UOQMCD
client
Traceback (most recent call last):
  File "ReadOracleToMq2.py", line 25, in <module>
    qmgr.connectTCPClient(queue_manager,pymqi.cd(),channel,conn_info)
  File "D:\Python25\Lib\site-packages\pymqi.py", line 823, in connectTCPClient
    self.connectWithOptions(name, cd)
  File "D:\Python25\Lib\site-packages\pymqi.py", line 807, in connectWithOptions

    raise MQMIError(rv[1], rv[2])
pymqi.MQMIError: MQI Error. Comp: 2, Reason 2277: FAILED: MQRC_CD_ERROR
shell returned 1
Hit any key to close this window...

Question information

Language:
English Edit question
Status:
Solved
For:
PyMQI Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was originally filed as bug #662518.

Revision history for this message
andypiper (andypiperuk) said :
#1

The underlying MQ error there is that the information in the MQCD structure is invalid. I don't have a MQ 5.3 environment to test on here but there's a chance that pymqi is not setting that structure up correctly (the API doc simply says that it will "Construct a MQCD Structure with default values as per MQI" but the valid values do change between MQ releases)

Another thought - you haven't specified the port as a string (does that matter in Python?) - try putting the value 16509 in quotes?

Revision history for this message
mseaspring (mseaspring) said :
#2

Thank for you attention and replay to me.
I will compay MQCD Structure default valuse witch MQ help doc,hope find
reason.

"Another thought - you haven't specified the port as a string (does that
matter in Python?) - try putting the value 16509 in quotes?"
---I have changed it,but not affect.
 Thank you for your advise!

Thank you & good luck!
2010/10/18 andypiper <email address hidden>

> The underlying MQ error there is that the information in the MQCD
> structure is invalid. I don't have a MQ 5.3 environment to test on here
> but there's a chance that pymqi is not setting that structure up
> correctly (the API doc simply says that it will "Construct a MQCD
> Structure with default values as per MQI" but the valid values do change
> between MQ releases)
>
> Another thought - you haven't specified the port as a string (does that
> matter in Python?) - try putting the value 16509 in quotes?
>
> --
> Reason 2277: FAILED: MQRC_CD_ERROR
> https://bugs.launchpad.net/bugs/662518
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Python interface to WebSphere MQ: New
>
> Bug description:
> MQ version:5.3
> when I running blow code:
>
>
> import pymqi
>
> channel='SYSTEM.DEF.SVRCONN'
> host='133.xxx.xx.xxx' #modify by me
> port=16509
> conn_info="%s(%s)"%(host,port)
> qmgr=pymqi.QueueManager(None)
> queue_manager='UOQMCD'
> queue_name='UOMQCD.ORDERINFO.OUT'
> mq_sid=1381
> print queue_manager
> print pymqi.__mqbuild__
> qmgr.connectTCPClient(queue_manager,pymqi.cd(),channel,conn_info)
> queue=pymqi.Queue(qmgr,queue_name)
> print queue_manager
>
>
> message = queue.get()
> print message
> queue.close()
> qmgr.disconnect()
>
> I got a error,I am sure host,port,conn_info,queue_manager,queue_name are
> right.
> Please help me. Thanks for you action!
>
> UOQMCD
> client
> Traceback (most recent call last):
> File "ReadOracleToMq2.py", line 25, in <module>
> qmgr.connectTCPClient(queue_manager,pymqi.cd(),channel,conn_info)
> File "D:\Python25\Lib\site-packages\pymqi.py", line 823, in
> connectTCPClient
> self.connectWithOptions(name, cd)
> File "D:\Python25\Lib\site-packages\pymqi.py", line 807, in
> connectWithOptions
>
> raise MQMIError(rv[1], rv[2])
> pymqi.MQMIError: MQI Error. Comp: 2, Reason 2277: FAILED: MQRC_CD_ERROR
> shell returned 1
> Hit any key to close this window...
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/pymqi/+bug/662518/+subscribe
>

--
==============================
联创科技
知行如一
苗海泉 <email address hidden>
==============================

Revision history for this message
Dariusz Suchojad (dsuch) said :
#3

Hi,

unfortunately I'm a little busy this week so please bear with me if I don't respond immediately, thanks!

PyMQI is coded in a way that should transparently handle any differences in MQ structures so what you hit upon *might* be a bug, we'll see.

A small problem is that I don't have access to MQ 5.3 anymore and I think IBM has stopped offering it for download long time ago. I'll see what I can do about it.

In the meantime, could you please tell me

- what is your OS version? I can see it's Windows but what version exactly? Is it 32bit or 64bit one?
- what is the OS MQ is running on?
- what is the exact MQ version? Is it 32bit or 64bit (I don't remember if there were a 64bit MQ 5.3 actually)?
- what PyMQI version are you using? Can you give me the exact name of the package you have downloaded?

Cheers!

Revision history for this message
mseaspring (mseaspring) said :
#4

Thank you for replay to me again,thank you bear me so poor english.
In fact, you respond to me quickly *be **the **opposite.

My *operating environment details as follows
My OS version: win 7 32 bits
MS MQ is running on:HP-UX rp8420-3 B.11.11 U 9000/800 (td) 64bits
MQ version:
# /opt/mqm/bin/mqver
Name: WebSphere MQ
Version: 530.7 CSD07
CMVC level: p530-07-L040527
BuildType: IKAP - (Production)

PyMQI version:pymqi-1.0.1.win32-py2.5-mq6.0-client

Thank you for you attention again,good luck!

2010/10/18 Dariusz Suchojad <email address hidden>

> Hi,
>
> unfortunately I'm a little busy this week so please bear with me if I
> don't respond immediately, thanks!
>
> PyMQI is coded in a way that should transparently handle any differences
> in MQ structures so what you hit upon *might* be a bug, we'll see.
>
> A small problem is that I don't have access to MQ 5.3 anymore and I
> think IBM has stopped offering it for download long time ago. I'll see
> what I can do about it.
>
> In the meantime, could you please tell me
>
> - what is your OS version? I can see it's Windows but what version exactly?
> Is it 32bit or 64bit one?
> - what is the OS MQ is running on?
> - what is the exact MQ version? Is it 32bit or 64bit (I don't remember if
> there were a 64bit MQ 5.3 actually)?
> - what PyMQI version are you using? Can you give me the exact name of the
> package you have downloaded?
>
> Cheers!
>
> --
> Reason 2277: FAILED: MQRC_CD_ERROR
> https://bugs.launchpad.net/bugs/662518
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Python interface to WebSphere MQ: New
>
> Bug description:
> MQ version:5.3
> when I running blow code:
>
>
> import pymqi
>
> channel='SYSTEM.DEF.SVRCONN'
> host='133.xxx.xx.xxx' #modify by me
> port=16509
> conn_info="%s(%s)"%(host,port)
> qmgr=pymqi.QueueManager(None)
> queue_manager='UOQMCD'
> queue_name='UOMQCD.ORDERINFO.OUT'
> mq_sid=1381
> print queue_manager
> print pymqi.__mqbuild__
> qmgr.connectTCPClient(queue_manager,pymqi.cd(),channel,conn_info)
> queue=pymqi.Queue(qmgr,queue_name)
> print queue_manager
>
>
> message = queue.get()
> print message
> queue.close()
> qmgr.disconnect()
>
> I got a error,I am sure host,port,conn_info,queue_manager,queue_name are
> right.
> Please help me. Thanks for you action!
>
> UOQMCD
> client
> Traceback (most recent call last):
> File "ReadOracleToMq2.py", line 25, in <module>
> qmgr.connectTCPClient(queue_manager,pymqi.cd(),channel,conn_info)
> File "D:\Python25\Lib\site-packages\pymqi.py", line 823, in
> connectTCPClient
> self.connectWithOptions(name, cd)
> File "D:\Python25\Lib\site-packages\pymqi.py", line 807, in
> connectWithOptions
>
> raise MQMIError(rv[1], rv[2])
> pymqi.MQMIError: MQI Error. Comp: 2, Reason 2277: FAILED: MQRC_CD_ERROR
> shell returned 1
> Hit any key to close this window...
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/pymqi/+bug/662518/+subscribe
>

Revision history for this message
Dariusz Suchojad (dsuch) said :
#5

> Name: WebSphere MQ
> Version: 530.7 CSD07

> PyMQI version:pymqi-1.0.1.win32-py2.5-mq6.0-client

Ah, that's the issue. See, PyMQI will handle changes in MQ structures but not if you're using the prebuilt binaries. For instance, pymqi-1.0.1.win32-py2.5-mq6.0-client has been built on a box running MQ 6.0 and that's the version it's expecting on the MQ side so in the essence, you're sending MQ an MQCD structure containing fields that has only been introduced in 6.0 and obviously 5.3 doesn't know anything about them.

You have a couple of options though (short of upgrading MQ to at least 6.0):

- you can compile PyMQI on a Windows box which has MQ 5.3 installed as outlined here http://packages.python.org/pymqi/mingw32.html. I was doing it several years ago and it worked perfectly fine. That's the safest bet and it will work.

- if compiling PyMQI is not an option, I can try and send you a patch you'll have to apply to pymqi.py. I'd be doing it a bit in a dark because I still don't have access to 5.3 so maybe we'll need a couple of iterations before it works. If it works at all, I can't guarantee it however I'll do my best.

- you can wait a little bit for me to build a binary for MQ 5.3. I think I've found someone who still uses 5.3 but I'm not sure if they're using Windows so I'm not certain I'll be able to compile it.

What do you think of it?

Revision history for this message
Dariusz Suchojad (dsuch) said :
#6

Ah and one more thing, be sure to use PyMQI 1.1 instead of 1.0.1. PyMQI 1.1 fixed a couple of issues and greatly improved support for Windows.

Revision history for this message
mseaspring (mseaspring) said :
#7

Thank you for your advise,I will tried you advises.
Thank you very much for help me.
You are a good man.

2010/10/19 Dariusz Suchojad <email address hidden>

> Ah and one more thing, be sure to use PyMQI 1.1 instead of 1.0.1. PyMQI
> 1.1 fixed a couple of issues and greatly improved support for Windows.
>
> --
> Reason 2277: FAILED: MQRC_CD_ERROR
> https://bugs.launchpad.net/bugs/662518
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Python interface to WebSphere MQ: New
>
> Bug description:
> MQ version:5.3
> when I running blow code:
>
>
> import pymqi
>
> channel='SYSTEM.DEF.SVRCONN'
> host='133.xxx.xx.xxx' #modify by me
> port=16509
> conn_info="%s(%s)"%(host,port)
> qmgr=pymqi.QueueManager(None)
> queue_manager='UOQMCD'
> queue_name='UOMQCD.ORDERINFO.OUT'
> mq_sid=1381
> print queue_manager
> print pymqi.__mqbuild__
> qmgr.connectTCPClient(queue_manager,pymqi.cd(),channel,conn_info)
> queue=pymqi.Queue(qmgr,queue_name)
> print queue_manager
>
>
> message = queue.get()
> print message
> queue.close()
> qmgr.disconnect()
>
> I got a error,I am sure host,port,conn_info,queue_manager,queue_name are
> right.
> Please help me. Thanks for you action!
>
> UOQMCD
> client
> Traceback (most recent call last):
> File "ReadOracleToMq2.py", line 25, in <module>
> qmgr.connectTCPClient(queue_manager,pymqi.cd(),channel,conn_info)
> File "D:\Python25\Lib\site-packages\pymqi.py", line 823, in
> connectTCPClient
> self.connectWithOptions(name, cd)
> File "D:\Python25\Lib\site-packages\pymqi.py", line 807, in
> connectWithOptions
>
> raise MQMIError(rv[1], rv[2])
> pymqi.MQMIError: MQI Error. Comp: 2, Reason 2277: FAILED: MQRC_CD_ERROR
> shell returned 1
> Hit any key to close this window...
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/pymqi/+bug/662518/+subscribe
>

--
==============================
联创科技
知行如一
苗海泉 <email address hidden>
==============================

Revision history for this message
mseaspring (mseaspring) said :
#8

I use python 2.5,I couldn't find PyMQ1.1 for Python2.5.
Thank you !

2010/10/19 Dariusz Suchojad <email address hidden>

> Ah and one more thing, be sure to use PyMQI 1.1 instead of 1.0.1. PyMQI
> 1.1 fixed a couple of issues and greatly improved support for Windows.
>
> --
> Reason 2277: FAILED: MQRC_CD_ERROR
> https://bugs.launchpad.net/bugs/662518
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Python interface to WebSphere MQ: New
>
> Bug description:
> MQ version:5.3
> when I running blow code:
>
>
> import pymqi
>
> channel='SYSTEM.DEF.SVRCONN'
> host='133.xxx.xx.xxx' #modify by me
> port=16509
> conn_info="%s(%s)"%(host,port)
> qmgr=pymqi.QueueManager(None)
> queue_manager='UOQMCD'
> queue_name='UOMQCD.ORDERINFO.OUT'
> mq_sid=1381
> print queue_manager
> print pymqi.__mqbuild__
> qmgr.connectTCPClient(queue_manager,pymqi.cd(),channel,conn_info)
> queue=pymqi.Queue(qmgr,queue_name)
> print queue_manager
>
>
> message = queue.get()
> print message
> queue.close()
> qmgr.disconnect()
>
> I got a error,I am sure host,port,conn_info,queue_manager,queue_name are
> right.
> Please help me. Thanks for you action!
>
> UOQMCD
> client
> Traceback (most recent call last):
> File "ReadOracleToMq2.py", line 25, in <module>
> qmgr.connectTCPClient(queue_manager,pymqi.cd(),channel,conn_info)
> File "D:\Python25\Lib\site-packages\pymqi.py", line 823, in
> connectTCPClient
> self.connectWithOptions(name, cd)
> File "D:\Python25\Lib\site-packages\pymqi.py", line 807, in
> connectWithOptions
>
> raise MQMIError(rv[1], rv[2])
> pymqi.MQMIError: MQI Error. Comp: 2, Reason 2277: FAILED: MQRC_CD_ERROR
> shell returned 1
> Hit any key to close this window...
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/pymqi/+bug/662518/+subscribe
>

--
==============================
联创科技
知行如一
苗海泉 <email address hidden>
==============================

Revision history for this message
mseaspring (mseaspring) said :
#9

"if compiling PyMQI is not an option, I can try and send you a patch
you'll have to apply to pymqi.py. I'd be doing it a bit in a dark
because I still don't have access to 5.3 so maybe we'll need a couple of
iterations before it works. If it works at all, I can't guarantee it
however I'll do my best."

------Could you give me a patch ? Thank you .

2010/10/19 Dariusz Suchojad <email address hidden>

>
> > Name: WebSphere MQ
> > Version: 530.7 CSD07
>
> > PyMQI version:pymqi-1.0.1.win32-py2.5-mq6.0-client
>
> Ah, that's the issue. See, PyMQI will handle changes in MQ structures
> but not if you're using the prebuilt binaries. For instance,
> pymqi-1.0.1.win32-py2.5-mq6.0-client has been built on a box running MQ
> 6.0 and that's the version it's expecting on the MQ side so in the
> essence, you're sending MQ an MQCD structure containing fields that has
> only been introduced in 6.0 and obviously 5.3 doesn't know anything
> about them.
>
> You have a couple of options though (short of upgrading MQ to at least
> 6.0):
>
> - you can compile PyMQI on a Windows box which has MQ 5.3 installed as
> outlined here http://packages.python.org/pymqi/mingw32.html. I was doing
> it several years ago and it worked perfectly fine. That's the safest bet
> and it will work.
>
> - if compiling PyMQI is not an option, I can try and send you a patch
> you'll have to apply to pymqi.py. I'd be doing it a bit in a dark
> because I still don't have access to 5.3 so maybe we'll need a couple of
> iterations before it works. If it works at all, I can't guarantee it
> however I'll do my best.
>
> - you can wait a little bit for me to build a binary for MQ 5.3. I think
> I've found someone who still uses 5.3 but I'm not sure if they're using
> Windows so I'm not certain I'll be able to compile it.
>
> What do you think of it?
>
> --
> Reason 2277: FAILED: MQRC_CD_ERROR
> https://bugs.launchpad.net/bugs/662518
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Python interface to WebSphere MQ: New
>
> Bug description:
> MQ version:5.3
> when I running blow code:
>
>
> import pymqi
>
> channel='SYSTEM.DEF.SVRCONN'
> host='133.xxx.xx.xxx' #modify by me
> port=16509
> conn_info="%s(%s)"%(host,port)
> qmgr=pymqi.QueueManager(None)
> queue_manager='UOQMCD'
> queue_name='UOMQCD.ORDERINFO.OUT'
> mq_sid=1381
> print queue_manager
> print pymqi.__mqbuild__
> qmgr.connectTCPClient(queue_manager,pymqi.cd(),channel,conn_info)
> queue=pymqi.Queue(qmgr,queue_name)
> print queue_manager
>
>
> message = queue.get()
> print message
> queue.close()
> qmgr.disconnect()
>
> I got a error,I am sure host,port,conn_info,queue_manager,queue_name are
> right.
> Please help me. Thanks for you action!
>
> UOQMCD
> client
> Traceback (most recent call last):
> File "ReadOracleToMq2.py", line 25, in <module>
> qmgr.connectTCPClient(queue_manager,pymqi.cd(),channel,conn_info)
> File "D:\Python25\Lib\site-packages\pymqi.py", line 823, in
> connectTCPClient
> self.connectWithOptions(name, cd)
> File "D:\Python25\Lib\site-packages\pymqi.py", line 807, in
> connectWithOptions
>
> raise MQMIError(rv[1], rv[2])
> pymqi.MQMIError: MQI Error. Comp: 2, Reason 2277: FAILED: MQRC_CD_ERROR
> shell returned 1
> Hit any key to close this window...
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/pymqi/+bug/662518/+subscribe
>

--
==============================
联创科技
知行如一
苗海泉 <email address hidden>
==============================

Revision history for this message
Dariusz Suchojad (dsuch) said :
#10

Not a bug in PyMQI so I'm converting to a question.

Revision history for this message
Dariusz Suchojad (dsuch) said :
#11

Hi, please find the patch below. Do let me know how it works for you. Cheers!

=== modified file 'src/pymqi.py'
--- src/pymqi.py 2010-07-09 22:11:14 +0000
+++ src/pymqi.py 2010-10-20 12:51:33 +0000
@@ -87,7 +87,7 @@
 # PyMQI
 import pymqe, CMQC, CMQCFC, CMQXC

-__version__ = "1.1"
+__version__ = "1.1.lp-q-130376"
 __mqlevels__ = pymqe.__mqlevels__
 __mqbuild__ = pymqe.__mqbuild__

@@ -300,11 +300,6 @@
             ['MsgToken', '', '16s'],
             ['ReturnedLength', CMQC.MQRL_UNDEFINED, MQLONG_TYPE],]

- if "7.0" in pymqe.__mqlevels__:
- opts += [
- ['Reserved2', 0L, MQLONG_TYPE],
- ['MsgHandle', 0L, 'q']]
-
         apply(MQOpts.__init__, (self, tuple(opts)), kw)

@@ -334,13 +329,6 @@
             ['PutMsgRecPtr', 0, 'P'],
             ['ResponseRecPtr', 0, 'P']]

- if "7.0" in pymqe.__mqlevels__:
- opts += [
- ['OriginalMsgHandle', 0L, 'q'],
- ['NewMsgHandle', 0L, 'q'],
- ['Action', 0L, MQLONG_TYPE],
- ['PubLevel', 0L, MQLONG_TYPE]]
-
         apply(MQOpts.__init__, (self, tuple(opts)), kw)

 class od(MQOpts):
@@ -370,37 +358,6 @@
             ['ResolvedQName', '', '48s'],
             ['ResolvedQMgrName', '', '48s'],]

- if "7.0" in pymqe.__mqlevels__:
- opts += [
-
- # ObjectString
- ['ObjectStringVSPtr', 0, 'P'],
- ['ObjectStringVSOffset', 0L, MQLONG_TYPE],
- ['ObjectStringVSBufSize', 0L, MQLONG_TYPE],
- ['ObjectStringVSLength', 0L, MQLONG_TYPE],
- ['ObjectStringVSCCSID', 0L, MQLONG_TYPE],
-
- # SelectionString
- ['SelectionStringVSPtr', 0, 'P'],
- ['SelectionStringVSOffset', 0L, MQLONG_TYPE],
- ['SelectionStringVSBufSize', 0L, MQLONG_TYPE],
- ['SelectionStringVSLength', 0L, MQLONG_TYPE],
- ['SelectionStringVSCCSID', 0L, MQLONG_TYPE],
-
- # ResObjectString
- ['ResObjectStringVSPtr', 0, 'P'],
- ['ResObjectStringVSOffset', 0L, MQLONG_TYPE],
- ['ResObjectStringVSBufSize', 0L, MQLONG_TYPE],
- ['ResObjectStringVSLength', 0L, MQLONG_TYPE],
- ['ResObjectStringVSCCSID', 0L, MQLONG_TYPE],
-
- ['ResolvedType', -3L, MQLONG_TYPE]]
-
- # For 64bit platforms MQLONG is an int and this pad
- # needs to be here for WMQ 7.0
- if MQLONG_TYPE == 'i':
- opts += [['pad','', '4s']]
-
         apply(MQOpts.__init__, (self, tuple(opts)), kw)

@@ -459,18 +416,9 @@
     # until runtime so set it once here when first importing pymqi
     # (originally written by Brent S. Elmer, Ph.D. (mailto:<email address hidden>)).

- if '7.0' in pymqe.__mqlevels__:
- _mqcd_version = CMQXC.MQCD_VERSION_9
- _mqcd_current_length = CMQXC.MQCD_LENGTH_9
-
- elif '6.0' in pymqe.__mqlevels__:
- _mqcd_version = CMQXC.MQCD_VERSION_8
- _mqcd_current_length = CMQXC.MQCD_LENGTH_8
-
- elif '5.3' in pymqe.__mqlevels__:
+ if '5.3' in pymqe.__mqlevels__:
         _mqcd_version = CMQXC.MQCD_VERSION_7
         _mqcd_current_length = CMQXC.MQCD_LENGTH_7
-
     else:
         # The default version in MQCD_DEFAULT in cmqxc.h is MQCD_VERSION_6
         _mqcd_version = CMQXC.MQCD_VERSION_6
@@ -558,23 +506,6 @@
             # No mqaiExecute means no 5.3, so redefine the struct version
             opts[1] = ['Version', CMQC.MQCD_VERSION_6, MQLONG_TYPE]

- if "6.0" in pymqe.__mqlevels__:
- opts += [['HdrCompList', [0L, -1L], '2' + MQLONG_TYPE],
- ['MsgCompList', [0] + 15 * [-1L], '16' + MQLONG_TYPE],
- ['CLWLChannelRank', 0L, MQLONG_TYPE],
- ['CLWLChannelPriority', 0L, MQLONG_TYPE],
- ['CLWLChannelWeight', 50L, MQLONG_TYPE],
- ['ChannelMonitoring', 0L, MQLONG_TYPE],
- ['ChannelStatistics', 0L, MQLONG_TYPE]]
-
- if "7.0" in pymqe.__mqlevels__:
- opts += [['SharingConversations', 10, MQLONG_TYPE],
- ['PropertyControl', 0, MQLONG_TYPE], # 0 = MQPROP_COMPATIBILITY
- ['MaxInstances', 999999999, MQLONG_TYPE],
- ['MaxInstancesPerClient', 999999999, MQLONG_TYPE],
- ['ClientChannelWeight', 0, MQLONG_TYPE],
- ['ConnectionAffinity', 1, MQLONG_TYPE]] # 1 = MQCAFTY_PREFERRED
-
         # In theory, the pad should've been placed right before the 'MsgExitPtr'
         # attribute, however setting it there makes no effect and that's why
         # it's being set here, as a last element in the list.
@@ -603,11 +534,6 @@
             ['AuthInfoRecOffset', 0L, MQLONG_TYPE],
             ['AuthInfoRecPtr', 0, 'P']]

- # Add new SSL fields defined in 6.0 and update version to 2
- if "6.0" in pymqe.__mqlevels__:
- opts += [['KeyResetCount', 0L, MQLONG_TYPE],
- ['FipsRequired', 0L, MQLONG_TYPE]]
-
         apply(MQOpts.__init__, (self, tuple(opts)), kw)

 #

Revision history for this message
mseaspring (mseaspring) said :
#12

Thank you ,I patch ,but I get other error like this:
"
Traceback (most recent call last):
  File "ReadOracleToMq.py", line 49, in <module>
    qmgr.connectTCPClient(queue_manager,cd,channel,conn_info)
  File "D:\Python25\lib\site-packages\pymqi.py", line 768, in
connectTCPClient
    self.connectWithOptions(name, cd)
  File "D:\Python25\lib\site-packages\pymqi.py", line 750, in
connectWithOptions

    rv = pymqe.MQCONNX(name, options, ocd.pack())
pymqe.error: MQCD wrong size. Given: 1748, expected 1840
shell returned 1
Hit any key to close this window...

"
2010/10/20 Dariusz Suchojad <email address hidden>

> Your question #130376 on PyMQI changed:
> https://answers.launchpad.net/pymqi/+question/130376
>
> Dariusz Suchojad posted a new comment:
> Hi, please find the patch below. Do let me know how it works for you.
> Cheers!
>
> === modified file 'src/pymqi.py'
> --- src/pymqi.py 2010-07-09 22:11:14 +0000
> +++ src/pymqi.py 2010-10-20 12:51:33 +0000
> @@ -87,7 +87,7 @@
> # PyMQI
> import pymqe, CMQC, CMQCFC, CMQXC
>
> -__version__ = "1.1"
> +__version__ = "1.1.lp-q-130376"
> __mqlevels__ = pymqe.__mqlevels__
> __mqbuild__ = pymqe.__mqbuild__
>
> @@ -300,11 +300,6 @@
> ['MsgToken', '', '16s'],
> ['ReturnedLength', CMQC.MQRL_UNDEFINED, MQLONG_TYPE],]
>
> - if "7.0" in pymqe.__mqlevels__:
> - opts += [
> - ['Reserved2', 0L, MQLONG_TYPE],
> - ['MsgHandle', 0L, 'q']]
> -
> apply(MQOpts.__init__, (self, tuple(opts)), kw)
>
>
> @@ -334,13 +329,6 @@
> ['PutMsgRecPtr', 0, 'P'],
> ['ResponseRecPtr', 0, 'P']]
>
> - if "7.0" in pymqe.__mqlevels__:
> - opts += [
> - ['OriginalMsgHandle', 0L, 'q'],
> - ['NewMsgHandle', 0L, 'q'],
> - ['Action', 0L, MQLONG_TYPE],
> - ['PubLevel', 0L, MQLONG_TYPE]]
> -
> apply(MQOpts.__init__, (self, tuple(opts)), kw)
>
> class od(MQOpts):
> @@ -370,37 +358,6 @@
> ['ResolvedQName', '', '48s'],
> ['ResolvedQMgrName', '', '48s'],]
>
> - if "7.0" in pymqe.__mqlevels__:
> - opts += [
> -
> - # ObjectString
> - ['ObjectStringVSPtr', 0, 'P'],
> - ['ObjectStringVSOffset', 0L, MQLONG_TYPE],
> - ['ObjectStringVSBufSize', 0L, MQLONG_TYPE],
> - ['ObjectStringVSLength', 0L, MQLONG_TYPE],
> - ['ObjectStringVSCCSID', 0L, MQLONG_TYPE],
> -
> - # SelectionString
> - ['SelectionStringVSPtr', 0, 'P'],
> - ['SelectionStringVSOffset', 0L, MQLONG_TYPE],
> - ['SelectionStringVSBufSize', 0L, MQLONG_TYPE],
> - ['SelectionStringVSLength', 0L, MQLONG_TYPE],
> - ['SelectionStringVSCCSID', 0L, MQLONG_TYPE],
> -
> - # ResObjectString
> - ['ResObjectStringVSPtr', 0, 'P'],
> - ['ResObjectStringVSOffset', 0L, MQLONG_TYPE],
> - ['ResObjectStringVSBufSize', 0L, MQLONG_TYPE],
> - ['ResObjectStringVSLength', 0L, MQLONG_TYPE],
> - ['ResObjectStringVSCCSID', 0L, MQLONG_TYPE],
> -
> - ['ResolvedType', -3L, MQLONG_TYPE]]
> -
> - # For 64bit platforms MQLONG is an int and this pad
> - # needs to be here for WMQ 7.0
> - if MQLONG_TYPE == 'i':
> - opts += [['pad','', '4s']]
> -
> apply(MQOpts.__init__, (self, tuple(opts)), kw)
>
>
> @@ -459,18 +416,9 @@
> # until runtime so set it once here when first importing pymqi
> # (originally written by Brent S. Elmer, Ph.D. (mailto:<email address hidden>
> )).
>
> - if '7.0' in pymqe.__mqlevels__:
> - _mqcd_version = CMQXC.MQCD_VERSION_9
> - _mqcd_current_length = CMQXC.MQCD_LENGTH_9
> -
> - elif '6.0' in pymqe.__mqlevels__:
> - _mqcd_version = CMQXC.MQCD_VERSION_8
> - _mqcd_current_length = CMQXC.MQCD_LENGTH_8
> -
> - elif '5.3' in pymqe.__mqlevels__:
> + if '5.3' in pymqe.__mqlevels__:
> _mqcd_version = CMQXC.MQCD_VERSION_7
> _mqcd_current_length = CMQXC.MQCD_LENGTH_7
> -
> else:
> # The default version in MQCD_DEFAULT in cmqxc.h is MQCD_VERSION_6
> _mqcd_version = CMQXC.MQCD_VERSION_6
> @@ -558,23 +506,6 @@
> # No mqaiExecute means no 5.3, so redefine the struct version
> opts[1] = ['Version', CMQC.MQCD_VERSION_6, MQLONG_TYPE]
>
> - if "6.0" in pymqe.__mqlevels__:
> - opts += [['HdrCompList', [0L, -1L], '2' + MQLONG_TYPE],
> - ['MsgCompList', [0] + 15 * [-1L], '16' +
> MQLONG_TYPE],
> - ['CLWLChannelRank', 0L, MQLONG_TYPE],
> - ['CLWLChannelPriority', 0L, MQLONG_TYPE],
> - ['CLWLChannelWeight', 50L, MQLONG_TYPE],
> - ['ChannelMonitoring', 0L, MQLONG_TYPE],
> - ['ChannelStatistics', 0L, MQLONG_TYPE]]
> -
> - if "7.0" in pymqe.__mqlevels__:
> - opts += [['SharingConversations', 10, MQLONG_TYPE],
> - ['PropertyControl', 0, MQLONG_TYPE], # 0 =
> MQPROP_COMPATIBILITY
> - ['MaxInstances', 999999999, MQLONG_TYPE],
> - ['MaxInstancesPerClient', 999999999, MQLONG_TYPE],
> - ['ClientChannelWeight', 0, MQLONG_TYPE],
> - ['ConnectionAffinity', 1, MQLONG_TYPE]] # 1 =
> MQCAFTY_PREFERRED
> -
> # In theory, the pad should've been placed right before the
> 'MsgExitPtr'
> # attribute, however setting it there makes no effect and that's
> why
> # it's being set here, as a last element in the list.
> @@ -603,11 +534,6 @@
> ['AuthInfoRecOffset', 0L, MQLONG_TYPE],
> ['AuthInfoRecPtr', 0, 'P']]
>
> - # Add new SSL fields defined in 6.0 and update version to 2
> - if "6.0" in pymqe.__mqlevels__:
> - opts += [['KeyResetCount', 0L, MQLONG_TYPE],
> - ['FipsRequired', 0L, MQLONG_TYPE]]
> -
> apply(MQOpts.__init__, (self, tuple(opts)), kw)
>
> #
>
> You received this question notification because you are a direct
> subscriber of the question.
>

--
==============================
联创科技
知行如一
苗海泉 <email address hidden>
==============================

Revision history for this message
Dariusz Suchojad (dsuch) said :
#13

OK, so what you've seen is a bad news indeed and it means my workaround is not going to work. The good news though is that I finally have access to MQ 5.3 running on Windows and I'll be able to provide you with an installer.

What I'd like you to tell me is what Python version I should use? 2.5 only? 2.5 and 2.6 as well?

Revision history for this message
mseaspring (mseaspring) said :
#14

Thank you for your replay to me again!
I used Python 2.5 version。

2010/10/29 Dariusz Suchojad <email address hidden>

> Your question #130376 on PyMQI changed:
> https://answers.launchpad.net/pymqi/+question/130376
>
> Status: Open => Needs information
>
> Dariusz Suchojad requested for more information:
>
> OK, so what you've seen is a bad news indeed and it means my workaround is
> not going to work. The good news though is that I finally have access to MQ
> 5.3 running on Windows and I'll be able to provide you with an installer.
>
> What I'd like you to tell me is what Python version I should use? 2.5
> only? 2.5 and 2.6 as well?
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/pymqi/+question/130376
>
> You received this question notification because you are a direct
> subscriber of the question.
>

--
==============================
联创科技
知行如一
苗海泉 <email address hidden>
==============================

Revision history for this message
Dariusz Suchojad (dsuch) said :
#15

I still don't have the installer but I'm working on it. In the meantime, can you please send me your e-mail address in? Here's my contact information http://packages.python.org/pymqi/support-consulting-contact.html. I'd rather send the installer directly to you and release the proper one for PyMQI 1.2, not for 1.1. Thanks.

Revision history for this message
mseaspring (mseaspring) said :
#16

Thank you,I'm email is <email address hidden>
2010/11/11 Dariusz Suchojad <email address hidden>

> Your question #130376 on PyMQI changed:
> https://answers.launchpad.net/pymqi/+question/130376
>
> Dariusz Suchojad posted a new comment:
> I still don't have the installer but I'm working on it. In the meantime,
> can you please send me your e-mail address in? Here's my contact
> information http://packages.python.org/pymqi/support-consulting-
> contact.html<http://packages.python.org/pymqi/support-consulting-%0Acontact.html>.
> I'd rather send the installer directly to you and release
> the proper one for PyMQI 1.2, not for 1.1. Thanks.
>
> --
> You received this question notification because you are a direct
> subscriber of the question.
>

--
==============================
联创科技
知行如一
苗海泉 <email address hidden>
==============================

Revision history for this message
Dariusz Suchojad (dsuch) said :
#17

Solved.