1
我通过.NET中使用7次(7.5 MQ客户amqmdnet.dll),并使用MQPutMessageOptions
和MQGetMessageOptions
,该代码工作正常与MQ 7.5 IBM客户端,但是问题IBM MQ客户端连接到一个较低的版本
说7x mq客户端将向下兼容6x,当我尝试连接,我得到这个错误(在Windows 7 64位操作系统)。
System.TypeInitializationException: The type initializer for 'IBM.WMQ.MQQueueManager' threw an exception. ---> System.TypeInitializationException: The type initializer for 'IBM.WMQ.CommonServices' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at IBM.WMQ.CommonServices..cctor()
--- End of inner exception stack trace ---
at IBM.WMQ.CommonServices.TraceEnabled()
at IBM.WMQ.MQBase..ctor()
at IBM.WMQ.Nmqi.NmqiEnvironment..ctor(NmqiPropertyHandler nmqiPropertyHandler)
at IBM.WMQ.Nmqi.NmqiFactory.GetInstance(NmqiPropertyHandler properties)
at IBM.WMQ.MQQueueManager..cctor()
抛出上述错误的行是:
MQQueueManager mqQMgr = new MQQueueManager("My queue manager" , "my channel name" ,"my connection name");
PS:具有相同PARAMS上述行工作在7.5 MQ客户端细,但未能当6×(用于例如:6.0。安装2.5 MQ客户端,我已经做了“典型”安装(完全安装6X MQ客户端)。
不知道如何使它与工作6.0.2.5?
非常好,我希望我可以多次点击此答案! – Sharpeye500 2013-04-04 17:26:02
好抓,沙市! – 2013-04-07 14:09:05